I have a jQuery UI dialog:
$("#dialog").dialog({
modal: true,
closeOnEscape: false,
resizable: false,
autoOpen: false,
open: function() {
$(".ui-dialog-titlebar").hide();
}
});
I am trying to open this dialog just before an AJAX call. It works using Firefox, but with IE it doesn't open, unless I put an alert, just after I open the dialog. Can anyone tell me what the problem might be please? I am using the following code:
$("button").click(function() {
$("#dialog").dialog('open');
//alert('test'); //if I put this alert, the dialog will open
$.ajax({
type: "POST",
url: "testing.txt",
async: false,
dataType: "text",
success: function(returnText) {
$("#dialog").dialog('close');
$("#textarea").text(returnText);
},
error: function() {
$("#dialog").dialog('close');
}
});
});