PDA

View Full Version : How to transfer information between DataFlex variables and javascript.



jforero
1-Oct-2024, 11:23 PM
Windows 10
DataFlex 23.0

Hi all.

I have a view in a windows application that is using the cWebView2Browser class to embed web technology.
In the OnCreate event of the cWebView2Browser, I am loading a index.html file that is calling a javascript file.
I need to transfer variable values from DataFlex to javascript.

How can I transfer that information between DataFlex and javascript.
Is there a command in the DataFlex code to send that information to javascript or a way to call that value from javascript code.

Thanks,
Jose.

Bram
2-Oct-2024, 02:42 AM
Windows 10
DataFlex 23.0

Hi all.

I have a view in a windows application that is using the cWebView2Browser class to embed web technology.
In the OnCreate event of the cWebView2Browser, I am loading a index.html file that is calling a javascript file.
I need to transfer variable values from DataFlex to javascript.

How can I transfer that information between DataFlex and javascript.
Is there a command in the DataFlex code to send that information to javascript or a way to call that value from javascript code.

Thanks,
Jose.

You can find an example in the Specialized Components Example. You do this using messages as you will then see.