0

使用此解决方案作为参考。我成功地打开了一个 jQuery 对话框,但无法让页面前进到发布的下一个表单。您可以看到我在哪里将提交方法更改为表单,但没有运气。

jQuery:

<script>
        $(function(){

            // jQuery UI Dialog    

            $('#jq-dialog').dialog({
                autoOpen: false,
                width: 400,
                modal: true,
                resizable: false,
                buttons: {
                    "Yes, I saved the document.": function() {
                        //document.testconfirmJQ.submit();
                        $('#testconfirmJQ').submit();
                    },
                    "No, I forgot.  Cancel.": function() {
                        $(this).dialog("close");
                    }
                }
            });

            $('form#testconfirmJQ').submit(function(e){
                e.preventDefault();
                $("span#dialog-email strong").html($("input#emailJQ").val());
                $('#jq-dialog').dialog('open');
            });          

        });

表格标签:

<form action="tech_maintenance_multiple.php" method="post" id="testconfirmJQ" name="testconfirmJQ">

提交按钮:

    <input type="submit" id="submitJQ" name="submitJQ" value="Please save this form and click here to add another AC" />
      </form>
<div id="jq-dialog" title="REMINDER!">
    <p class="alert alert-error">You must save this document and attach it later to an email when all systems are complete.  Did you save it?
</div>
4

0 回答 0