jQuery UI dialog and Ajax POST, JSON
- by Mithun
Is it possible to combine Ajax post with jQuery UI dialog?
And I want to process the ajax reponse in JSON to HTML for showing inside the Dialog box
var url = AJAX_URL+requestId+'/'+userId;
// Need to POST the requestId and userId instead of GET
$("body").append("<div id='dialog-modal'>Loading...</div>");
$("#dialog-modal").dialog("destroy");
$("#dialog-modal").load(url).dialog(
{
modal: true,
title: "Update Status",
buttons: {
Cancel : function() {
$(this).dialog('close');
},
Update: function() {
// Do something
}
}
}
);