Massimiliano Marini schrieb:
I manage my form with this "Form Plugin" code:
$(document).ready(function() {
$('#f1').ajaxForm(function() {
target: '#response',
success: function() {
$('#response').fadeIn('slow');
}
});
Maybe it help, the call to the plugin for the form validation is
simply :
$("#f1").validationAideEnable();
But I don't know if both plugin can work together. Any idea?
There is an example for integration with the form plugin:
http://jquery.bassistance.de/validate/demo-test/ajaxSubmit-intergration-demo.html
There is certainly room to improve that example...
The interesting code is this:
var v = jQuery("#form").validate({
submitHandler: function(form) {
jQuery(form).ajaxSubmit({
dataType: "json",
after: function(result) {
if(result.status) {
v.showErrors(result.data);
v.focusInvalid();
}
}
});
}
});
-- Jörn