I got a dialog which showing a table, and when i click on a "Delete" button, I will pop up another dialog to ask for confirmation. Currently this works fine at the first time, but if I click the "Delete" button for the second time, the delete dialog is shown behind the first table dialog, so it is actually invisible to the user.
I tried to set the z-index for both dialog, but I don't know why it is only working at the first time
Following is the sample of my script:
// The 1st dialog
var $detaildialog = $('#tableplaceholder').dialog({
autoOpen: false,
modal: true,
width: '800',
height: 'auto'
});
// Some steps to set the url.. then open the dialog
$detaildialog.load(url, function () {
$('#loading').hide();
$detaildialog.dialog('open');
});
// Then, when delete action is called, open the second dialog
fnOnDeleting: function (tr, id, fnDeleteRow) {
var $dialog = $('#checkdeletedialog').dialog({
autoOpen: false,
modal: true,
title: 'Delete Confirmation',
zIndex: 90000
});
$dialog.dialog('open');
}
Anything I am doing wrong here?
Appreciate any help.. thanks :)