I am calling a php script when a modal dialog is closed. Once the script executes I want to display a success or failure message and reload the ui tab that the modal was launched from.
I can do all of it aside from the sucess or fail message. I can get the php script to echo some html, but this is immediately overridden when I reload the tab. I can ammend the php script to send a variable if needs be. This is what I have so far:
- $(function() {
var current_id;
var $ajaxdata = $("#ajaxdata");
$(".dialog_link").dialog("destroy");
$("#dialog-confirm").dialog({
autoOpen: false,
resizable: false,
height:150,
modal: true,
buttons: {
'Delete Administrator': function() {
$(this).dialog('close');
$ajaxdata.load('administrators/ssbin/do_delete_administrator.php?' + 'aduid=' + current_id + '');
$('#tabs').tabs('load', 0);
},
Cancel: function() {
$(this).dialog('close');
}
}
});
$('.dialog_link').click(function(){
current_id = $(this).attr('id');
$('#dialog-confirm').dialog('open');
return false;
});
});