how to update a single table cell using ajax

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

That'll never work because it's not valid HTML; a DIV can't be a child of a TR.

You can alwaus just do the following:

<td id="descPlaceholder">

Eric Yen wrote:

You can alwaus just do the following:

<td id="descPlaceholder">

Wow, many thanks to both of you!