I've gotten around IE's lack of innerHTML support in tables by creating an entirely new table then ripping the row(s) out of it.

<table>
   <tbody id="mainTbody">
       <tr>...</tr>
   </tbody>
</table>

<script>
   var rowHtml = '<tr><td>data</td></tr>';
   var div = document.createElement('div');
   div.innerHtml = '<table><tbody>' + rowHtml + '</tbody></table>';
   var tbody = div.firstChild.firstChild;
   var row = tbody.firstChild;
   tbody.removeChild(row);
   document.getElementById('mainTbody').appendChild(row);
</script>

Cheers,
Lance.

Jesse Kuhnert wrote:
In IE you can only replace the inner content of td elements, anything
above that is off limits.

But......tables are still a perfectly acceptable way to lay content
out.  I've played the floating div css whatever game and found it to
be more trouble than it's worth a lot (but not always) of the time.
Or I'm just lazy.  :)   (but even the "ajax kings" - ie gmail / others
use a lot of tables as well so it must be not as bad as people think)

On 7/28/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
For what I can remember table elements substitution (innerHTML ='...') have
problem under M$IE either if you threat 'em with dom.
The tbody element is needed tho handle all table 'real' content and to
separate that content from the header and footer that i threat for different
scopes.

On 7/28/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote:
that is true they do get tricky when it comes to vertical scaling, you
need
to use javascript to maintain that. however im still confused onto y you
are
using a tbody. i have no idea wether a tbody would have problems with
ajax.
I dont think it would.
----- Original Message -----
From: "Andrea Chiumenti" <[EMAIL PROTECTED]>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Friday, July 27, 2007 5:23 PM
Subject: Re: ajax question


Yes the use of div would be very nice, but as far as I know div elements
don't expand very well vertically, so building a table using div
elements
for cells and rows would be a little tricky. .... sigh!

ps.: I hate tables too

On 7/27/07, Evan Rawson - Work <[EMAIL PROTECTED]> wrote:
tbody is a soon to be deprecated html element. i would recommend
steering
away from tables and try to utilize div's and css as much as possible.
Especially if you wanna be using alot of AJAX.
----- Original Message -----
From: "Andrea Chiumenti" <[EMAIL PROTECTED]>
To: "Tapestry users" <users@tapestry.apache.org>
Sent: Thursday, July 26, 2007 1:30 AM
Subject: Re: ajax question


Yea!
"..because they are evil bastards"
+1


On 7/26/07, Marcus Schulte <[EMAIL PROTECTED]> wrote:
- at least, that's a pretty decent reason, isn't it?

2007/7/26, Jesse Kuhnert <[EMAIL PROTECTED]>:
IE won't let you do it. ..because they are evil bastards.

On 7/25/07, Andrea Chiumenti <[EMAIL PROTECTED]> wrote:
Does anybody know if there are some problems in updating a tbody
element
when performing an ajax request?

Thx,
kiuma


--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com


--
Marcus Schulte
http://marcus-schulte.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reply via email to