Hey everyone :)
I''m trying to do something like the following:
link_to_remote :url => {blah}, :update => ''table-id'',
:position => ''bottom''
This works flawlessly in firefox and safari, but does not work in IE.  It
throws an error: "Unspecified runtime error." and does nothing.  I did
some
research, and it appears IE doesn''t like updating the innerHTML of
tables
and table rows.
My question is: is there a way to add table rows in IE without it blowing
up on me?  I''d rather not send the entire table over again, as
I''m working
in a situation where the table could be rather large.
Thanks!
Brian
> My question is: is there a way to add table rows in IE without it > blowing > up on me? I''d rather not send the entire table over again, as I''m > working > in a situation where the table could be rather large.IE has a hidden tag called thead that sits between table and tr. It''s a bit of a mess to make it work cross browser. I usually just wrap the table in a div and send over the entire table again. -- David Heinemeier Hansson http://www.loudthinking.com -- Broadcasting Brain http://www.basecamphq.com -- Online project management http://www.backpackit.com -- Personal information manager http://www.rubyonrails.com -- Web-application framework
On 17/05/05, David Heinemeier Hansson <david-OiTZALl8rpK0mm7Ywyx6yg@public.gmane.org> wrote:> > My question is: is there a way to add table rows in IE without it > > blowing > > up on me? I''d rather not send the entire table over again, as I''m > > working > > in a situation where the table could be rather large. > > IE has a hidden tag called thead that sits between table and tr. It''s > a bit of a mess to make it work cross browser. I usually just wrap > the table in a div and send over the entire table again.I just use thead and tbody tags in the table explicitly. Add or reset the tbody, it does work perfectly well. Plus you get the benefits of the header row repeating if you''re printing things, though I wish you could make the thead rows static in a table that has overflow:auto... <table> <thead> header row </thead> <tbody id="tablecontent"> content rows </tbody> </table> document.getElementById(''tablecontent'').innerHTML = x; // table rows. or use the W3C table manipulation methods, which look a bit nicer, but are many, many times slower in IE. -- Phillip Hutchings http://www.sitharus.com/ sitharus-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org / sitharus-QrR4M9swfipWk0Htik3J/w@public.gmane.org
On May 16, 2005, at 6:43 PM, David Heinemeier Hansson wrote:>> My question is: is there a way to add table rows in IE without it >> blowing >> up on me? I''d rather not send the entire table over again, as I''m >> working >> in a situation where the table could be rather large. >> > > IE has a hidden tag called thead that sits between table and tr. > It''s a bit of a mess to make it work cross browser. I usually just > wrap the table in a div and send over the entire table again.IIRC, IE always adds an anonymous tbody to a table without any, so you can use: myTable.tBodies[0] as the destination for your appendChild()s
Gavin Kistner wrote:> On May 16, 2005, at 6:43 PM, David Heinemeier Hansson wrote: > >>> My question is: is there a way to add table rows in IE without it >>> blowing >>> up on me? I''d rather not send the entire table over again, as I''m >>> working >>> in a situation where the table could be rather large. >>> >> >> IE has a hidden tag called thead that sits between table and tr. >> It''s a bit of a mess to make it work cross browser. I usually just >> wrap the table in a div and send over the entire table again. > > > IIRC, IE always adds an anonymous tbody to a table without any, so > you can use: > myTable.tBodies[0] > as the destination for your appendChild()s > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Thanks for the tips guys :) I''ll try it out.