I am currently making a client to gather data from a webservice. Sometimes the connection fails and I put a try catch to prevent the page from going to error page. What I would like to do is to show a pop-up on exeption, to tell the user to try again. I know about "alert" on JS, but can't really make it pop without user action (i.e. clicking a button).
Is this the wisest approach? How can I do this?
Thank you
alert()to the page from server-side code, outside of a JavaScript function, then it will run when the page loads.