Change dialog content after opening
My situation:
I have a long saving-proces. In my Ajax-call I open the dialog with the beforeSend method.
-
$.ajax({
....
beforeSend: function () {
$("#saving").dialog({
bgiframe: true,
modal: true,
resizable: false
}); }
...
This works fine.
In the dialog, I display "Saving..."
After the ajaxCall is succesfull I want to change the message and add a button "OK" to it.
-
$("#saving").html("Data saved");
$('#saving').dialog('option', 'buttons',
{ "Ok": function() {
$(this).dialog("close");
}
});
But this won't work...
Is it possible to change the dialog-content on the fly or is there another jQuery component to create this behavior?