Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Refresh template
#1
My case:  

with THandlers.Add('', 'form1', TContentForm.Create(TForm1)) do
  begin
    CanStartSession := true;
    RequiresSessionStart := false;
 end;


with THandlers.Add('', 'form2', TContentForm.Create(TForm2)) do
  begin
    CanStartSession := true;
    RequiresSessionStart := false;
 end;


Both Forms have mastertemplate.html. I this template dynamic Javascript in div create Bootstrap mega menu depending of language user. 
mastertemplate.html <div id="menu"></div>  

WebApplication.CallBackResponse.AddJavaScriptToExecuteAsCDATA fill this div with timer in tform1 and tform2. This work. I can not refresh this template OnCreate or OnShow thats why timer in form.
<div id="menu">
<ul>
      <li><a href="form1">Form1</a></li>
      <li><a href="form2">Form2</a></li>
</ul>
</div>

RefreshTemplate function is define in UserSession and run in timer individual form.

If i have open Form1 and click again link to form1 then load mastertemplate empty div for menu!

Is a change only refresh mastertemplate for all forms?
Reply


Messages In This Thread
Refresh template - by matija - 09-15-2021, 11:43 AM
RE: Refresh template - by Jose Nilton Pace - 09-15-2021, 02:30 PM
RE: Refresh template - by matija - 09-15-2021, 06:24 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)