jQuery UI dialog and Ajax POST, JSON
Posted
by Mithun
on Stack Overflow
See other posts from Stack Overflow
or by Mithun
Published on 2010-03-16T06:02:39Z
Indexed on
2010/03/16
6:06 UTC
Read the original article
Hit count: 615
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
}
}
}
);
© Stack Overflow or respective owner