Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

how do I execute or call javascript from delphi?

 Post Reply Post Reply
Author
Morango Jose View Drop Down
New Member
New Member
Avatar

Joined: 15 Jul 2018
Posts: 18
Post Options Post Options   Quote Morango Jose Quote  Post ReplyReply Direct Link To This Post Topic: how do I execute or call javascript from delphi?
    Posted: 15 Jul 2018 at 9:24pm
Hi I've been testing and playing with tms web core, just loving the great job you tms guys have done!

But how do I execute or call javascript from delphi?,

For example  I  have button  on my delphi web core form and in the click event I want to call a javascript


procedure TForm1.WebButton1Click(Sender: TObject);
begin
    // call javascript 
     // some kind of AjaxExecute like in intraweb  or  AddJs  like in unigui
    // the goal is to run  some jquery
end;

Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8074
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jul 2018 at 10:30pm
You can directly add JavaScript code in an ASM block in your code.

Example:

procedure TForm.MyTest;
var
  a: integer;
begin
   a := 42;
   asm
      alert('this is my JavaScript call ' +a);
   end;
end;
Back to Top
Morango Jose View Drop Down
New Member
New Member
Avatar

Joined: 15 Jul 2018
Posts: 18
Post Options Post Options   Quote Morango Jose Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jul 2018 at 10:10am
Thank's Bruno,

I will give it a try.
Back to Top
Morango Jose View Drop Down
New Member
New Member
Avatar

Joined: 15 Jul 2018
Posts: 18
Post Options Post Options   Quote Morango Jose Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jul 2018 at 10:29am
Hi again Bruno
I have just finish doing some testing,
I works just great.

I loving tms web core more and more each day :) Any idea of prices for this lovely framework?

Regards

Jos?
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8074
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jul 2018 at 8:56pm
Launch price will be 295EUR/single developer license
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down