Forum: Ruby on Rails Sending the selected option of a select via ajax

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5bbaf82e891bb25702a10782b6b17f56?d=identicon&s=25 Pascal Friederich (Guest)
on 2007-04-28 14:35
(Received via mailing list)

i want to create a form which contains 3 select-boxes which content
depend on each other.
i created the first select box:

<select id="timeblock_project" name="timeblock[project]" onclick="<%=
remote function(:update => 'new_sub_project', :url => { :action =>
'timeblock_submenu_tag', :id => ????}) -%> ">
  <% for project in @projects %>
    <option value="<>">
  <% end %>

<td id="new_sub_project">

the :id => ??? should be replaced with the id of the project in the
selected option-tag, but.. how?


This topic is locked and can not be replied to.