Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var shouldCancelSubmit = false;
- $("#testForm").submit( function( event ) {
- jConfirm('Are you sure you want to submit the form?','Really Submit',
- function(ans){
- shouldSubmit = ans;
- })
- if ( !shouldSubmit ) {
- event.preventDefault();
- }
- });
Add Comment
Please, Sign In to add comment