On 11/2/05, Alessandro Cauduro <news@w3haus.com.br>
wrote:>
> Hi!
>
> I have a simple task list application, the top of the page is a form to be
> filled in and insert a new task. When a new task is added, the bottom part
> of the page is updated via AJAX with all the tasks.
>
> My question is: how do I validate the task information when it is
> submitted via Rails (not JavaScript) and show the errors on the top of the
> page, and only if it is valid, should it then proceed to update the task
> list? ? What has happened is that my div with the AJAX content gets updated
> with the same form as the top of the page, but showing the errors ..
>
Hopefully, this reply is not too late to be useful.
I''ve just finished a small text on this subject. You can find this text
at
http://www.bigsmoke.us/ajax-validation-in-rails/
Note that I haven''t tested the page in IE. If you find anything
incomplete
or missing, please let me know.
Happy coding,
Rowan
--
Morality is usually taught by the immoral.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060329/6efb0c17/attachment.html