Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Execute JS in template
#1
In my HTML template i have JS function.

function openNav(){
...
}

procedure TForm1.IWAppFormShow(Sender: TObject);
begin

InitAddProc('openNav();');

end;

This not work?
Reply
#2
Hi Matija. If you are going to execute a JS function right after FormShow, why not do it in the template itself when it's ready?
Code:
<head>
  <script>
    $(function(){
      openNav();
    });
  </script>
</head>
Reply
#3
(08-22-2019, 05:51 PM)Jose Nilton Pace Wrote: Hi Matija. If you are going to execute a JS function right after FormShow, why not do it in the template itself when it's ready?
Code:
<head>
  <script>
    $(function(){
      openNav();
    });
  </script>
</head>

This also work. Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)