Using this solution as a reference。我正在成功打开一个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>