Print Page | Close Window

how do I execute or call javascript from delphi?

Printed From: TMS Software
Category: WEB
Forum Name: WEB Core
Forum Discription:
URL: http://www.tmssoftware.com/site/forum/forum_posts.asp?TID=11173
Printed Date: 21 Sep 2019 at 12:45am


Topic: how do I execute or call javascript from delphi?
Posted By: Morango Jose
Subject: how do I execute or call javascript from delphi?
Date 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;




Replies:
Posted By: Bruno Fierens
Date 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;


Posted By: Morango Jose
Date Posted: 16 Jul 2018 at 10:10am
Thank's Bruno,

I will give it a try.


Posted By: Morango Jose
Date 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?


Posted By: Bruno Fierens
Date Posted: 22 Jul 2018 at 8:56pm
Launch price will be 295EUR/single developer license



Print Page | Close Window