Forum: Ruby on Rails Accessing form array when errors display

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Buntin, Seth - KATE (Guest)
on 2006-02-28 18:19
(Received via mailing list)
Is there a way to access (from JavaScript preferably) the form array of
the information sent when errors are display?  I want to be able to find
out what values were selected on the form before errors.



Seth B.

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University



On March 1, 2006, Murray State University will begin moving all of its
telephone numbers in the 762- exchange to an 809- exchange.

My new number will be (270) 809-4207
Buntin, Seth - KATE (Guest)
on 2006-02-28 21:43
Maybe I can expand on this a little bit and someone can point me in the
right direction.  I have a select menu, when something is selected in
that menu another select menu gets filled.  Everything works fine until
there is an error on the page and when the errors are displayed those
select menus that were filled via AJAX are now blank.  So what I have
done is I have used AJAX.Updater to force the redisplay of the select
menus depending on what is selected in the others, now I need to see
which one was previously selected (in the AJAX'ed menus) so that I can
set them as selected again.  Does this make sense?  Am I going about
this the wrong way?

Buntin, Seth - KATE wrote:
> Is there a way to access (from JavaScript preferably) the form array of
> the information sent when errors are display?  I want to be able to find
> out what values were selected on the form before errors.
>
>
>
> Seth B.
>
> Web Resources Coordinator
>
> Kentucky Academy of Technology Education
>
> Murray State University
>
>
>
> On March 1, 2006, Murray State University will begin moving all of its
> telephone numbers in the 762- exchange to an 809- exchange.
>
> My new number will be (270) 809-4207
This topic is locked and can not be replied to.