Hi Friends,
In my situation I have to create dialogue when somebody clicks on the link
as these links are dynamic.When I try the dialogue.('close') then it closes
for the first time and then doesn't close the dialogue and when we see
html we can see multiple dialogue are there but display:none but one with
display: Block.
I tried with $('#Dialogue1').remove it runs fine on Chrome but error out on
IE 9. Object not supported error.
$('a#Dialogue1').live('click', function (e) {
var page = $(this).attr("href") //get url of link
var $dialog = $('<div id="divDialogue1"></div>')
.html('<iframe id="editcomment" style="border: 0px; " src="' + page + '" width="100%" height="100%"></iframe>')
.dialog({
autoOpen: false,
modal: true,
height: 350,
width: 540,
title: "New Dialogue",
resizable: false,
close: function (event, ui) {
$(this).dialog('destroy').remove()
// $('#divDialogue1').remove();
if (document.getElementById('propCheck').value == "true") {
loadPage();//just to refresh the page
}
}
});
$dialog.dialog('open');
});
later part in aspx page...
function closeDialogues() { $("#divDialogue1").dialog('close'); // $("#divDialogue1").dialog('destroy');
return;
}