Created
September 26, 2012 14:01
-
-
Save StevenLangbroek/3788238 to your computer and use it in GitHub Desktop.
validationEngine ajax-handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
$('#myForm').validationEngine('attach', { | |
onValidationComplete: function(form, status){ | |
if(status){ // als ie validate | |
var url = form.attr('action'), | |
data = form.serialize(), | |
message = '<p>Hier het bedankt bericht</p>'; | |
$.post(url, data, function(results){ | |
form.load('/die_template_dus'); // of form.html($(results)); als je de return in je formulier wilt plaatsen. | |
}); | |
} | |
} | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment