Alert dialog triggered by JSL throw in Interactive mode
When JSL runs from a button script it is running in interactive mode and produces alert dialogs when JMP thinks you should know what happened. If you run a script by submitting it, JSL runs in batch mode and just sends alerts to the log. I think in your case you probably want to use stop() rather than throw("msg").
When you submit this script, it runs in batch mode and brings up a window. When you click a button in the window, the button script runs interactively.
newwindow("x",
buttonbox("throw(err msg)",setscript(print(1);throw("this is an error message");print(2))),
buttonbox("throw",setscript(print(3);throw();print(4))),
buttonbox("stop",setscript(print(5);stop();print(6))),
)
For each of the buttons, only the first number is printed in the log because the script stops.
Craige