I am sure that this has been asked many times. the last one I saw was in December 2012. But I would like to ask if anyone has a fix / best workaround for this problem.
I am using jQueryUI Dialog and I would like to ask if it is possible to stop the execution of the script when a dialog appears and the user has not yet selected an answer. Like javascript confirm() .
Here is what I still have:
JQuery
$("#GlobalDialogBox").dialog({ modal: true, buttons: { "Yes": function () { callbackFunctionTrue(); $(this).dialog('close'); }, "No": function () { callbackFunctionFalse(); $(this).dialog('close'); } } }); alert("This should fire after answering the dialog box.");
alert is a common part of a script that runs after a response to a dialog box, regardless of the response. According to my fix, I just inserted alert into callbackFunctionTrue() and callbackFunctionFlase() , and it does the job.
But what if I do not want to do this? How can I stop the script when a dialog appears so that I can freely add my codes below the dialog script? Does anyone have a better solution? Any help would be appreciated! Thank you in advance!:]
source share