PDA

View Full Version : سوال: حذف به صورت ایجکسی



usefzade
پنج شنبه 20 شهریور 1393, 21:19 عصر
123330
با چه کدی میتونم اون دکمه حذفی که آخر صفحه هست رو فعال کنم؟؟یعنی وقتی روش میزنه حذف کنه این پیام رو...؟؟:متفکر:
اینم کدیه ک برای نمایشش استفاده میکنم:




<script>
function ShowMessage(id, fromInbox) {
$.ajax({
type: "POST",
url: '@Url.Action("ReportShow", "Message")',
data: { Id: id, FromInbox: fromInbox },
success: function (html) {
bootbox.dialog({
message: html,
title: "مشاهده پیام",
buttons: {
main: {
label: "انصراف",
className: "btn-primary",
callback: function () {


}
},
remove: {
label: "حذف",
className: "btn-primary",
callback: function () {
$('#dell').submit();
setTimeout(function () { location.reload() }, 500);
return false;
}
}
}
});


}


});
}


</script>

usefzade
جمعه 21 شهریور 1393, 15:31 عصر
:متفکر::متفکر:؟؟؟؟؟؟؟؟؟؟؟؟

star_rh
سه شنبه 25 شهریور 1393, 12:56 عصر
.remove مربوط به دکمه حذفه.
deleteUrl آدرس Ajax برای حذفه.

$("body").on("click",".remove",function(){
$.getJSON("DeleteUrl",{id:""},function(data){
//
});
});