I'm trying to update a table cell based upon a selection in another cell
identified as "descPlaceholder". However, instead of getting the
intended cell updated the updated string gets displayed completely
outside of the table in a seemingly arbitrary spot on the form.
The form:
<table>
<tr>
<th>Code</th>
<th>Name</th>
<th>Quantity</th>
</tr>
<tr>
<td>
<%= select_tag :partcode,
options_from_collection_for_select(@parts, 'id', 'code')
%>
<%= observe_field(:partcode,
:update => :descPlaceholder,
:url => {:action => :getPartName})
%>
</td>
<div id="descPlaceholder">
<td>placeholder for description</td>
</div>
<td>
<%= text_field "partquantity", "quantity", :size =>5, :maxlength
=>5 %>
</td>
</tr>
</table>
getPartName.html.erb:
<td>Test Description</td>
getPartName method:
def
end
--
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.