Skip to content

Div’s does not wrap tr’s

September 16, 2009
tags: , ,

I tried to update a HTML div elevement wrapping around a table row inside a table.

<table>
<tr>
<td>Pomme</td>
</tr>
<div id="placeholder">
<tr>
<td>SomethingElse</td>
</tr>
</div>

I wasted 1 hour to find out why my ajax calls aren’t updating the right table row.

Apparently it’s not valid HTML. The div will always be on top and then the table tag.

A workaround that I found to put a placeholder id inside a table is by using <tbody>. So simply substitute the div with a tbody tag and you’re done.

Advertisements
No comments yet

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: