is there any way to freeze runing code till message closed?
such as :
function ShowMessage()
{
return $( "#dialog-confirm" ).dialog({
resizable: false,
height:140,
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
},
Cancel: function() {
$( this ).dialog( "close" );
}
}
});
}
if(ShowMessage() == 1) // 1 --> Ok, 2--> Cancel
{
DoMyCodeCase1;
}
else
{
DoMyCodeCase2
}
So i want to stop running remain code till finish the response of Confirmation Message.