Hi there, I'm using 'Really Easy Field Validation' to handle my validation. Now i wish to submit the form to a div with Ajax, therefore i need to stop the original form submit and post it to contact.php 'in the div'. Then i'd like to return the contact.php page's response, e.g. 'Your message has been sent!'
I seem to be unable to stop the submitting on if(result) I know i can use a callback function, but Event.stop(ev) doesn't seem to work. I have the newest Prototype, Really Easy Field Validation and Scriptaculous My code looks like this: <script language="javascript"> var valid = new Validation('myForm', { immediate : false, onFormValidate : HandleForm }); Validation.addAllThese([ ['name', 'Custom name messae, 2 to 75 chars', { minLength : 2, maxLength : 75, include : ['required validate-alphanum'] }], ['email', 'Custom email message', { minLength : 1, include : ['validate-email'] }], ]); function HandleForm( result, form ){ if ( result ) { new Ajax.Updater('contact', 'contact.php', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); } } </script> Thanks for any help, Knal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---