I am showing delete confirmation box using jQuery UI dialog. But on del开发者_如何学JAVAete I don't want to make any ajax call when user click on delete, as after deleting I want to redirect to home page. The delete should make normal http request with method delete. How can I achieve it?
$("#delDialog").dialog({
autoOpen: false,
width: 300,
modal: true,
resizable: false,
buttons: {
"Delete": function() {
if (gohome) // redirect to home
{
//here I want to make normal call to delete post without using .post/.get/.ajax
$(this).dialog("close");
}
},
"Cancel": function() {
$(this).dialog("close");
}
}
});
Im pretty sure ryan from railcasts.com shows you how to exactly what your after in one or two of his screencasts.
Have a squiz, because I ws looking at using html delete requests without an ajax call and saw his way on his screencasts.
精彩评论