Javascript Unload event..
894843Jan 6 2012 — edited Jan 9 2012Hi all..
I am using "Unload" event in "Dynamic actions".
I would like to "conditionally" run my javascript when "unloads". I have some buttons on my page, when users press the buttons i dont want the "unload event" to run my javascript.
I tried "Dynamic action" event ""unload"
{code}
var req = '&REQUEST.';
if (req == 'BUTTON1' or req == 'BUTTON2')
{
alert ('dont run');
}
else
{
alert ('run');
}
{code}
It didn't worked , as the "REQUEST" value is not yet set by the button.
Is there any way to do this?
Thanks