> Yes. Use Event#stop to prevent default submit action. Fire an ajax
> request that does the validation. Show a "validating" indicator, upon
> receiving the request back, just use $('my_form_id').submit() to
> submit the form.

Thanks for hint :)

I was testing Event.stop but somehow I was thinking about it only in
context of failed validation inside my onSuccess function. I just
haven't thought about stoping even earlier before ajax request and
then just submiting form by myself.

> If you're planning to validate on submit only and on the server side, what's 
> the point in doing it with an ajax
> request ?

No I have 2 functions to run on sumbit:

- nice validation of many other fields in browser
- simple checking if username is taken by ajax request

If it is taken I don't want to submit form and reload the whole page
agan - that's all :)

Thanks a lot :)
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 
For more options, visit this group at 

Reply via email to