Atozed Forums
Detect change variable - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Detect change variable (/thread-2639.html)



Detect change variable - matija - 02-11-2022

In template in have javascript variable 
var MyIndex=1;

Javascript change MyIndex=2;

How do intraweb I let me change the variable? Trigger! EventListener!


RE: Detect change variable - Alexandre Machado - 02-14-2022

You mean from an IntraWeb event?

You need to add JavaScript to deal with it:

For instance, in a Callback call, you should use:

WebApplication.CallbackResponse.AddJavaScriptToExecute('MyIndex = 3');

This will be executed when the request is received by the browser.

If that's not what you want, please add more details to your question


RE: Detect change variable - matija - 02-14-2022

(02-14-2022, 05:44 AM)Alexandre Machado Wrote: You mean from an IntraWeb event?

You need to add JavaScript to deal with it:

For instance, in a Callback call, you should use:

WebApplication.CallbackResponse.AddJavaScriptToExecute('MyIndex = 3');

This will be executed when the request is received by the browser.

If that's not what you want, please add more details to your question

My case:

Create OpenLayers Map: Intraweb -> JS:='MyMap(markers);' -> AddToInitProc(JS);

if click to marker -> change var MyIndex in Javascript

I have to say now it has changed this MyIndex and return this variable?