I am having difficulty using JQuery UI Modal Dialog when submitting a form. The intent is you hit the submit button, the modal pop ups and depending on your selection from t
Use a button labeled "Submit" to open the dialog:
Please double check to be sure all data is entered correctly.
Use the Submit
button in the dialog to trigger the click event for your
.
function submitForm() {
$('input#<%=btnSubmit.ClientID %>').click();
}
function checkSubmit() {
$("#dialog").dialog({
"modal": true,
"buttons": {
"Submit": function() {
submitForm();
},
"Go Back": function() {
$(this).dialog("close");
}
}
});
}
$(document).ready(function() {
$('button#preSubmit').click(function(e) {
checkSubmit();
e.preventDefault();
return false;
});
$('button#saveForLater').click(function(e) {
$("#dialog").dialog('close');
e.preventDefault();
return false;
});
});