You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andrea Chiumenti <ki...@gmail.com> on 2007/07/25 08:38:34 UTC

ajax question

Does anybody know if there are some problems in updating a tbody element
when performing an ajax request?

Thx,
 kiuma

Re: ajax question

Posted by Lance <la...@marketpipe.com>.
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 <ki...@gmail.com> 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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
>>> To: "Tapestry users" <us...@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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
>>>>> To: "Tapestry users" <us...@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 <et...@googlemail.com> wrote:
>>>>>>             
>>>>>>> - at least, that's a pretty decent reason, isn't it?
>>>>>>>
>>>>>>> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
>>>>>>>               
>>>>>>>> IE won't let you do it. ..because they are evil bastards.
>>>>>>>>
>>>>>>>> On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>           
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>       
>
>
>   

Re: ajax question

Posted by Jesse Kuhnert <jk...@gmail.com>.
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 <ki...@gmail.com> 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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
> > To: "Tapestry users" <us...@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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
> > >> To: "Tapestry users" <us...@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 <et...@googlemail.com> wrote:
> > >> >>
> > >> >> - at least, that's a pretty decent reason, isn't it?
> > >> >>
> > >> >> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
> > >> >> >
> > >> >> > IE won't let you do it. ..because they are evil bastards.
> > >> >> >
> > >> >> > On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
> > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >>
> > >>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ajax question

Posted by Andrea Chiumenti <ki...@gmail.com>.
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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
> To: "Tapestry users" <us...@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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
> >> To: "Tapestry users" <us...@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 <et...@googlemail.com> wrote:
> >> >>
> >> >> - at least, that's a pretty decent reason, isn't it?
> >> >>
> >> >> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
> >> >> >
> >> >> > IE won't let you do it. ..because they are evil bastards.
> >> >> >
> >> >> > On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: ajax question

Posted by Evan Rawson - Work <er...@americanadtrader.com>.
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" <ki...@gmail.com>
To: "Tapestry users" <us...@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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
>> To: "Tapestry users" <us...@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 <et...@googlemail.com> wrote:
>> >>
>> >> - at least, that's a pretty decent reason, isn't it?
>> >>
>> >> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
>> >> >
>> >> > IE won't let you do it. ..because they are evil bastards.
>> >> >
>> >> > On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ajax question

Posted by Andrea Chiumenti <ki...@gmail.com>.
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 <er...@americanadtrader.com> 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" <ki...@gmail.com>
> To: "Tapestry users" <us...@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 <et...@googlemail.com> wrote:
> >>
> >> - at least, that's a pretty decent reason, isn't it?
> >>
> >> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
> >> >
> >> > IE won't let you do it. ..because they are evil bastards.
> >> >
> >> > On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: ajax question

Posted by Evan Rawson - Work <er...@americanadtrader.com>.
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" <ki...@gmail.com>
To: "Tapestry users" <us...@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 <et...@googlemail.com> wrote:
>>
>> - at least, that's a pretty decent reason, isn't it?
>>
>> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
>> >
>> > IE won't let you do it. ..because they are evil bastards.
>> >
>> > On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ajax question

Posted by Andrea Chiumenti <ki...@gmail.com>.
Yea!
"..because they are evil bastards"
+1


On 7/26/07, Marcus Schulte <et...@googlemail.com> wrote:
>
> - at least, that's a pretty decent reason, isn't it?
>
> 2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
> >
> > IE won't let you do it. ..because they are evil bastards.
> >
> > On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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
>

Re: ajax question

Posted by Marcus Schulte <et...@googlemail.com>.
 - at least, that's a pretty decent reason, isn't it?

2007/7/26, Jesse Kuhnert <jk...@gmail.com>:
>
> IE won't let you do it. ..because they are evil bastards.
>
> On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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

Re: ajax question

Posted by Jesse Kuhnert <jk...@gmail.com>.
IE won't let you do it. ..because they are evil bastards.

On 7/25/07, Andrea Chiumenti <ki...@gmail.com> 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