Problem rendering within a table

Hi, I seem to be having an issue with rendering a partial within a table. Basically, I had a partial with all my <tr> and <td> tags that was to be rendered inside the <table> tags on my page. When it rendered, all the tags were removed for some reason and just the text remained, so it went outside my table. However, when I include the <table> tags inside the partial, it renders everything just fine. I believe the problem is with my acts_as_authenticated plugin, as I remember getting an authentication error at one point. Does anyone know if that plugin has a problem with inserting a partial into a table?

The other potential reason is I'm using scriptaculous and ajax for all of these. I tried giving all my <tr>'s and even <td>'s unique IDs but that didnt work either. If anyone has a suggestion or has run into this problem before I'd love to know. I just want to be able to update within a table with ajax. Thanks!

Hi, I seem to be having an issue with rendering a partial within a table. Basically, I had a partial with all my <tr> and <td> tags that was to be rendered inside the <table> tags on my page. When it
rendered, all the tags were removed for some reason and just the text
remained, so it went outside my table. However, when I include the <table> tags inside the partial, it renders everything just fine. I believe the problem is with my acts_as_authenticated plugin, as I remember getting an authentication error at one point. Does anyone know if that plugin has a problem with inserting a partial into a table?

I can't think why the two would conflict. Show us some code :-), and
eyeball the generated html closely.

Fred

Frederick Cheung wrote:

an authentication error at one point. Does anyone know if that plugin has a problem with inserting a partial into a table?

I can't think why the two would conflict. Show us some code :-), and eyeball the generated html closely.

Fred

Ok, here's the table where it's supposed to be inserted:

<table>

<tr>   <td>Description</td> </tr> <tr>   <td><%=text_field_tag :description, '', :size => '13' %>   <%= observe_field(:description, :frequency=>0.1, :update=>"hardware_list", :url=>{:action=>:get_description_list})%></td> </tr>

<div id="hardware_list"></div> #insert partial here

</table>

the controller function(get_description_list) runs some stuff and ends up with:

render :partial => 'index_search_by_desc', :locals => { :hardwares => @hardwares }

then this is the partial it renders:

<% for hardware in hardwares %>   <tr>     <td><%= link_to hardware.description, hardware %></td>   </tr> <% end %>

the partial is renders and displays everything minus the table tags.

Having a div at the top level of a table like that is invalid html

Fred

Frederick Cheung wrote:

You're allowed multiple tbodys though, so you can do <table> <tbody> static rows here </tbody> <tbody id="hardware_list"> </tbody> </table> and insert your rows into that second tbody.

Fred

Frederick Cheung wrote: