I have an existing web application that uses window.showmodaldialog() to display certain forms and, based on the return value, execute some other Java scripts
For instance:
var retVal = window.showmodaldialog('...'); if (retVal==XXX) callXXX(); else callYYY();
When showModalDialog() is showModalDialog() , it blocks JS execution in the main window until the modal is closed.
I am trying to replace these modal windows with jQuery dialogs, but the problem is that after executing $(...).dialog().open() , JavaScript execution does not wait for the dialog to close.
I know that there are jQuery APIs that allow me to set up a callback function, but for me this involves a lot of changes. In any case, I can pause the execution of JavaScript until the dialog is closed (I still have to execute scripts from the dialog).
source share