Hi I open UI dialog this way:
function openDialog(page, heightPar, title) {
var $dialog1 = jQuery('#dialog');
$dialog1.load('../EMS/' + page);
$dialog1.dialog({
autoOpen: false,
title: title, //Add New Contact Personel
modal: true,
height: heightPar,
width: 450,
show: 'puff',
hide: 'puff',
close: function (event, ui) {
$dialog1.html('');
$dialog1.dialog('destroy');
// window.location.reload();
}
});
$dialog1.dialog('open');
}
and on this dialog i have another copy of this function but with main variable name dialog2, so what i want is to open another dialog from one opened before, is that possible? cos now if i open second it replease the first one.
You are creating the dialog in the div with id #dialog, so if your other function also creates the dialog in #dialog it will be replaced,
Try creating the other dialog in a new div #dialog2.