I'm calling a dialog that says "Please wait while the page is loading.." from differnt functions. The dialog opens up fine when called one function(working function) but doesn't open when called from other functions(clearAll) on the same page. The other function executes fine but just the dialog doesn't appear. Any ideas whats going wrong ? Thanks
$(document).ready(function() {
...................
$("#waitDialog").dialog({autoOpen: false, modal: true, width: 500, maxWidth: 500, closeOnEscape: false, open: function(event, ui) { $(".ui-dialog-titlebar").hide(); } });
});
.....
function clearAll(){
$("#waitDialog").dialog('open');
.........
....ajax call..
$("#waitDialog").dialog('close');
}
function working(){
$("#waitDialog").dialog('open');
... ajax call...
sub_working();
}
function sub_working(){
...
$("#waitDialog").dialog('close');
}
.................
//removed the tags at the begining and ending of div tags intentionally here ..
div id="waitDialog" style="display:none;background-color:blue;">
Please wait while the page is loading..
/div>