If things are not clear.
@children is set in the controller ie:
@children = [ ["Select Child", ""], ["John",
"1"], ["Mary", "2"],
["Fred", "3"] ]
On May 6, 7:55 am, OhMyRuby
<rashan...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> In my view I have
>
> form.select( :child, @children.map { | u | [0], u[1] }, { },
> { :onchange = remote_function(
> :url => {:action =>
"rjs_call_here"},
> :with => " ''child_picked=''
+
> escape(value)" ) } )
>
> Everything works well with ajax and drop down menu.
>
> My problem is that when the user hits submit I want the same drop down
> menu as above displayed but this time with
> the user selection showing.
>
> On thought is to check in the view to see if a the user has made a
> selection and then show a different drop down.
>
> I am not sure of what method to use in order to do this.
>
> In other words I need to reflect user choice of the drop down after
> the user has clicked on the submit button.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---