Hi,
I hope this reply is not too late to be useful, but I just wrote a text
discussing just this. You can find that text at
http://www.bigsmoke.us/ajax-validation-in-rails. Note that I haven''t
tested
the page in IE. If you find anything missing, please let me know.
Cheers,
Rowan
On 2/23/06, mr cox <3coxy4@gmail.com> wrote:>
> Hi everyone,
>
> I''m working on an file upload page that uses an ajax progress bar
> (http://sean.treadway.info/demo/upload/). I''ve also got validation
on
> the uploads (must be a certain file size/mime type etc). When uploads
> pass validation - all is dandy. But when they fail - I can''t work
out
> how to redisplay the form with the flash error messages (that normally
> appear when not using the ajax progress bar).
>
> I''m new to RoR so apologies if i''ve missed something
simple. I guess
> this has to do with the form being submitted to a hidden iframe? So how
> can I display the error messages to the user - in the normal way (i.e.
> the flash messages at the top of the form) - after an upload fails
> validation. Ideally i''d do a "redirect_to :action =>
''new'' " (instead of
> "render") when the object is not saved but how do I display the
flash
> messages and keep the form contents filled in this case?
>
> Cheers,
>
> coxy
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Morality is usually taught by the immoral.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060329/eb08a63b/attachment-0001.html