I have an existing web application which uses window.showmodaldialog() to show certain forms and based on the return value it executes some other JavaScripts
For example:
var retVal = window.showmodaldialog('...');
if (retVal==XXX)
callXXX();
else
callYYY();
When showModalDialog() is executed it blocks the JS execution on the main window until the modal is closed.
I am trying to replace these modal Windows with jQuery dialogs but the problem is that once the $(...).dialog().open() is executed the JavaScript execution does not wait for the dialog to be closed.
I know that there are jQuery APIs which allow me to configure a callback function but that involves a lot of changes for me. Is there anyway by which I can pause JavaScript execution until the dialog is closed (I must still be able to execute scripts from the dialog).