> So my question is still open - is there any way to check something
> with ajax request on submit and submit form when you have true/false
> response?

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.

The reason this pattern is not used more often is that it somehow
defeats the purpose of ajax. 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 ? That extra request is useless should the form validate, and
it represents a meager advantage over a synchronous request otherwise
(possibly reduced file size).

Best,

Tobie
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to