Hi there,

I'm using Really Easy Field Validation, which works fine for
but after succesful validation i want to process the form with Ajax.
Therefore i want to use the 'onSubmit:false' parameter, but if the
doesn't encounter any errors, it still just submits.

I have the newest Prototype, Scriptaculous and Really Easy Field

My code is below the message.

Many thanks,

<form id="myForm" action="contact.php" method="post">
        <input name="name" id="name" class="name" />
        <input name="email" id="email" class="email" />
        <textarea name="message" id="message" cols="40" rows="4"
        <input type="submit" value="Submit" />
<script language="javascript">
var valid = new Validation('myForm', { onSubmit:false, immediate :
false, onFormValidate : HandleForm });

        ['name', 'Custom name msg', { minLength : 2, maxLength : 75,
include : ['required validate-alphanum'] }],
        ['email', 'Custom email msg', { minLength : 1, include : ['validate-
email'] }],

function HandleForm( result, form ){
        if ( result ) {
                var valid = new Validation('myForm', { onSubmit:false, 
immediate :
true, onFormValidate : HandleForm });

The reason why i'm re-declaring 'var valid' is that after first errors
i wan't the validator
to react on onBlur events instead of waiting for a new submit.

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 

Reply via email to