Forum Replies Created
Viewing 1 post (of 1 total)
- AuthorPosts
mgoldsm7
ParticipantThank you, Ally and katw!
I was able to get it working with the following code:
jQuery(function ($) {
if (location.href == ‘http://mywebsite.com/query-form/’) {
$(document).ready(function() {
formmodified=0;
$(‘form *’).change(function(){
formmodified=1;
});
window.onbeforeunload = confirmExit;
function confirmExit() {
if (formmodified == 1) {
return “New information not saved. Do you wish to leave the page?”;
}
}
$(“.quform-button-submit”).click(function() {
formmodified = 0;
});
});
}
});- AuthorPosts
Viewing 1 post (of 1 total)