Wes Gamble
2007-Mar-13 22:47 UTC
Can''t update tbody in IE 6 with page[''name''].replace_html
Can anyone verify that you can''t update a tbody element in IE 6 by using page[''name]''.replace_html? I''ve tried all three ways I know to update the innerHTML property of the tbody and it won''t take. But page[''name''].insert_html works fine. Just look for corroboration. Thanks, Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bill Walton
2007-Mar-13 23:01 UTC
Re: Can''t update tbody in IE 6 with page[''name''].replace_html
Hi Wes, Wes Gamble wrote:> Can anyone verify that you can''t update a tbody > element in IE 6 by using page[''name]''.replace_html?It''s true for all IE versions. IE uses MS Table DOM, not the W3C DOM. There''s an explanation on MSDN. You can replace a tbody, you can insert another tbody above or below, but you basically can''t do anything via Ajax with an existing <tbody> or <tr>. I think you can update a <td> if that does anything for you. Not 100% sure of all the caveats on that though. hth, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
MichaelLatta
2007-Mar-13 23:18 UTC
Re: Can''t update tbody in IE 6 with page[''name''].replace_html
I guess this was why I got that error with the Dojo FilteringTable on IE. On Mar 13, 4:01 pm, "Bill Walton" <bill.wal...-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> Hi Wes, > > Wes Gamble wrote: > > Can anyone verify that you can''t update a tbody > > element in IE 6 by using page[''name]''.replace_html? > > It''s true for all IE versions. IE uses MS Table DOM, not the W3C DOM. > There''s an explanation on MSDN. You can replace a tbody, you can insert > another tbody above or below, but you basically can''t do anything via Ajax > with an existing <tbody> or <tr>. I think you can update a <td> if that > does anything for you. Not 100% sure of all the caveats on that though. > > hth, > Bill--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Wes Gamble
2007-Mar-13 23:41 UTC
Re: Can''t update tbody in IE 6 with page[''name''].replace_htm
What I needed to do was to replace a whole set of rows (in a datagrid) with another set. Luckily, IE does follow DOM level 2 (at least for what I needed), and I solved my problem by deleting each row from the bottom up (you have to do it from the bottom up or the relative indexing of rows within the <tbody> element will change), and then doing a "page.insert_html" to the bottom of the tbody (which will at that point have no rows in it). It is a pain in the arse, but it does work in both IE and FF. XSLDatagrid::ROWS_TO_DISPLAY is the number of rows in the tbody named xdgRowSet_thingy. Here''s the code: render :update do |page| (0..XSLDatagrid::ROWS_TO_DISPLAY - 1).to_a.reverse.each do |index| page << "$(''xdgRowSet_#{XSLDatagrid::CONTAINER_ID}'').deleteRow(#{index});" end page.insert_html(:bottom, "xdgRowSet_#{XSLDatagrid::CONTAINER_ID}", output) ...other stuff... end I have such mixed feelings about this project, it causes me so much grief but then I always end up learning something useful by overcoming all these ridiculous f-in'' problems ;). Wes -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bill Walton
2007-Mar-14 00:52 UTC
Re: Can''t update tbody in IE 6 with page[''name''].replace_htm
Hi Wes, Good info. Thanks! I''ll put this in the Save folder. Best regards, Bill --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---