That default value is set by the model, through the controller, when the view is rendered.

At what level do you need to *get* the value? (Because, as 7stud pointed out, it's already known to the system.) If you need to get the value in a JavaScript within the page, you can either use rjs to set the variable value, or you can use regular JS to read the current value out of the form element.

        val = $F('your_element_id'); //prototype JS

Walter

On Aug 25, 2011, at 9:48 AM, Leonel *.* wrote:

It's a form. Has a drop-down menu, created by a collection_select. Since
it's an edit page, then the value is ALREADY SELECTED by the time you
get to that edit page.

--
Posted via http://www.ruby-forum.com/.

--
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- [email protected]. To unsubscribe from this group, send email to [email protected] . For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en .


--
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to