I want to translate this HTML code into a RoR code. The form is very
simple, it has a combo box, and when the user selects a value in the
list I would like to display a message that says, “You selected the
color X”
I know that I need a controller and a viewer. My question is about what
do I need to code the viewer to do somethin similar to this:
Select A Color From
The List:
Red
Green
Blue
Pink
Yellow
If you want to run some action on change, then write like this:
<select name=‘select’ onchange=‘<%= remote_function :url => { :action =>
‘changed’ }, :with => “Form.Element.serialize(this)” %>’>
…
If you want to run some action on change, then write like this:
<select name=‘select’ onchange=‘<%= remote_function :url => { :action =>
‘changed’ }, :with => “Form.Element.serialize(this)” %>’>
…
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.