Jquery在表单提交中确认(库)

时间:2016-07-25 02:59:43

标签: jquery html

我正在使用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"

            });

我想在这里做两件事

  1. 需要两次点击才能进行确认并将列表移至数据中。
  2. 弹出框显示在页面底部。
  3. 非常感谢任何帮助。提前谢谢

0 个答案:

没有答案