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