Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
passing Delphi variable to javascript variable
#1
Hi,

Is there a way to pass Delphi var to a javascript variable?

I know that I can call WebApplication.CallBackResponse.AddJavaScriptToExecute 
to execute a javascript function and pass it the actual string (i.e. value of the variable).

But if I don't want to expose the contents of the delphi variable in html/javascript, 
how do I pass it?

Thanks,
Joe
Reply
#2
I need a little more context. You can just declare a variable in Javascript using AddJavaScriptToExecute(), and then use it anywhere.

Like: WebApplication.CallbackResponse.AddJavaScriptToExecute('var myvariable = "abcd"');

and it will be available while this page is active.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)