You can try this also .......
<select name="timesheet[filter]" id="filter" onchange="if (value=='car')
{Element.show('car');Element.hide('bike');Element.hide('motor');} else
{if {(value=='bike')
{Element.show('bike');Element.hide('car');Element.hide('motor');}else
{Element.show('motor');Element.hide('car');Element.hide('bike');}}"}>
<option value="car" >Car</option>
<option value="bike" >Bike</option>
<option value="motor" >Motor</option>
</select>
<div id="car">Showing Car</div>
<div id="bike">Showing Bike</div>
<div id="motor">Showing Motor</div>
Regards,
Salil
--
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 [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
-~----------~----~----~----~------~----~------~--~---