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/.
> </td>
> <div id="descPlaceholder">
> <td>placeholder for description</td>
> </div>
> <td>
That'll never work because it's not valid HTML; a DIV can't be a child
of a TR.
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Wow, many thanks to both of you!