<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><category>pcsoft.us.windev</category><copyright>Copyright 2026, PC SOFT</copyright><lastBuildDate>16 Aug 2015 15:18:00 Z</lastBuildDate><pubDate>16 Aug 2015 00:53:00 Z</pubDate><description>Hello All:&#13;
&#13;
I'm working in a Web page [WB20] and using JavaScript code in a Button Click event.&#13;
I have to pass a value to a JS function so I have defined a val variable in Javascript, so doing val = 30 or val = 50, everything works fine.&#13;
&#13;
Now, I need the pass the real value which comes from another procedure. I have a global variable defined in W Language but it seems when I do:&#13;
val = globalvar doesn't pass the value. In other words, I can't access global variables from the JS code. I tried to use a control to set the values and then take it form the JS code, but I couldn't get access either.&#13;
&#13;
Is there a way to accomplish this?&#13;
&#13;
Thanks in advance&#13;
Gus</description><ttl>30</ttl><generator>WEBDEV</generator><language>en_US</language><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code/read.awp</link><title>[WB20] How to access global variables or controls from JS code?</title><managingEditor>moderateur@pcsoft.fr (El moderador)</managingEditor><webMaster>webmaster@pcsoft.fr (El webmaster)</webMaster><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code-53553/read.awp</comments><pubDate>16 Aug 2015 15:18:00 Z</pubDate><description>Hi Gus,&#13;
&#13;
Your wlanguage code (browser side) is automatically translated into JS code for execution. As a result, every field a…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code-53553/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code-53553/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code/read.awp">[WB20] How to access global variables or controls from JS code?</source><title>Re: [WB20] How to access global variables or controls from JS code?</title></item><item><author>guest</author><category>pcsoft.us.windev</category><comments>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code-53552/read.awp</comments><pubDate>16 Aug 2015 10:01:00 Z</pubDate><description>Hi Gus&#13;
&#13;
One way is to put %1 in your java code instead of the variable. Then you use Stringbuild to put in the real value, and…</description><guid isPermaLink="true">https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code-53552/read.awp</guid><link>https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code-53552/read.awp</link><source url="https://forum.pcsoft.fr/es-ES/pcsoft.us.windev/53544-wb20-how-access-global-variables-controls-from-code/read.awp">[WB20] How to access global variables or controls from JS code?</source><title>Re: [WB20] How to access global variables or controls from JS code?</title></item></channel></rss>
