Jump to content

Recommended Posts

Posted

Hello

I am trying to pass variables from the delphi form to unigui Javascript and back. I have successfully created a variable called 'CurrentX' and in the delphi unigui form i execute: 

   Self.WebForm.JSInterface.JSAssign('CurrentX', [123456]); //some arbitrary number.

Then, from a component's ClientEvents (ExtEvents) i can view the variable value via:

   fmMyForm.windows.CurrentX  //value 123456.

I can set this variable to another value from within the ClientEvents (ExtEvents)

  fmMyForm.windows.CurrentX=654321;

 

My Question is: Back on the unigui form, how can I access this value?

Thank you

Doug

Posted

Hello,

16 hours ago, dkeene said:

My Question is: Back on the unigui form, how can I access this value?

 

16 hours ago, dkeene said:

I can set this variable to another value from within the ClientEvents (ExtEvents)

  fmMyForm.windows.CurrentX=654321;

One possible solution, simply use with ajaxRequest:

fmMyForm.window.CurrentX=654321;
ajaxRequest(fmMyForm.window, 'setCurrentX', [...]);

 

Posted

Thank you; if there is a Self.WebForm.JSInterface.JSAssign, should there not be an opposite method to retrieve the value?

something like:

Self.WebForm.JSInterface.JSRetrieve('CurrentX', [aVariable]);

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...