Hi John,
You'll never be able to mimic the Clarion Message statement exactly. Fundamentally the browser is disconnected from the server, so you are already limited as to "when" a message is possible.
I need to document this process more completely in order to make it clear when you can, and can't, get a popup message.
Cheers
Bruce