我正在使用Jquery Confirm Library并使用像这样的
$('#GoToLead').on('click', function (e) {
console.log('from on click');
e.preventDefault();
$('<input type="hidden" name="StartDate" />').val($('#StartDate').val()).appendTo('#theForm');
$('<input type="hidden" name="EndDate" />').val($('#EndDate').val()).appendTo('#theForm');
$('<input type="hidden" name="City" />').val($('#City').val()).appendTo('#theForm');
$('<input type="hidden" name="AbbrName" />').val($('#AbbrName').val()).appendTo('#theForm');
$('<input type="hidden" name="ZipCode" />').val($('#ZipCode').val()).appendTo('#theForm');
$('<input type="hidden" name="FirstName" />').val($('#FirstName').val()).appendTo('#theForm');
$('<input type="hidden" name="LastName" />').val($('#LastName').val()).appendTo('#theForm');
$('<input type="hidden" name="EmailAddress" />').val($('#EmailAddress').val()).appendTo('#theForm');
$('<input type="hidden" name="GroupNumber" />').val($('#GroupNumber').val()).appendTo('#theForm');
var buttonid = this.id;
callAssignGroupModal(buttonid);
//alert("data = " + $('#theForm').serialize());
});
});
function callAssignGroupModal() {
$("#GoToLead").confirm({
confirm: function (buttonid) {
//var token = $("input[name='__RequestVerificationToken']").val();
var buttonclickedId = buttonid;
var formData = $('#theForm').val();
$("form").submit();
},
confirmButton: "Continue",
confirmButtonClass: "btn-primary",
cancelButton: "Cancel",
cancelButtonClass: "btn-default",
dialogClass: "modal-dialog modal-lg",
post: false,
text: "Are you sure you want to assign the Group Number of all these leads?",
title: "Confirm assign the Group number to leads"
});
我想在这里做两件事
非常感谢任何帮助。提前谢谢