Hello David...
If I understand correctly your question, you need to first run a server code, THEN a browser code...
To do that, do your executeprocess of the button with the server code... In that code, once the server part is done:
- either run another page with the value you need as parameters and which will run your browser code in the onload part
- or set a flag in your current page (an invisible field workw well for that) then do a pagerefresh of that page... In the onload code of the page, test the value of the flag. If it is set, then run your browser code
best regards
Fabrice Harari
WinDev, WebDev, WinDev Mobile consulting