how do I execute or call javascript from delphi?

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;

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;

Thank's Bruno,

I will give it a try.

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?

Launch price will be 295EUR/single developer license