I seem to have run into a dead end and wanted to double-check to ensure I am not overlooking something. In an <asp:ImageButton>
I am using the OnClientClick event
(e.g., OnClientClick="return ClientSideChecks('Delete')")
to obtain user confirmation of an action that will result in problems if he/she made a mistake. The JavaScript that is now called returns either true or false based on the user's response on a window.confirm dialog; this works OK. However, I would like the replace the clunky window.confirm dialog with a more appealing and user-friendly jQuery UI dialog. This is where the problem arises because it appears (based on a fair amount of research and testing) that there is no way to do this (other than window.alert) and return a true or false in Javascript or jQuery; I have seen repeatedly that JavaScript is asynchronous, so the processing will not stop and wait for a response from the jQuery UI confirmation dialog. The apparent solution is to attach all the required downstream processing to callback functions attached to the buttons on the dialog, but I am not at liberty now to change basic structure of how the page works; I just need to get a true or false back from a JavaScript function that is called by the OnClientClick event. Is there indeed no way to do this other than with window.alert? Thanks in advance for any assistance.