Executing Javascript

In the action event of a simple webbutton


Does nothing!

I am not trying to replace msgbox I simply want to see JS work in a control.
No matter what I have tried no JS works when using the above method.

Chrome, IE and Forefox the same.
No blockers etc running.
Windows 8


So after playing around it seems that having 2 controls with me.executejavascript(“scriptHere”) allows only the first one that fires to work while the second does nothing?

What am I doing wrong or is this normal?

There are certain types of actions which need to occur in the same event loop as the user action, and showing an alert is one of them. Since the user click is sent to the server in the first event loop and the alert code is fired in the event that occurs when it returns, this will not work.

Figured it was something like this. I am done with trying to hack with JS.

Time to look at WebSDK or CSS (at least for styling options)