Hi all, Can anyone tell me why this line of code works in FF but not IE?? function stuff(id){ record_id=$(id); record_id.innerHTML = "foo"; } I get a ''Runtime Error''. -- ----------------------- Iggy Sandejas Web Developer 0419 485 252 D-Frag Solutions http://www.dfrag.com.au -----------------------
Guess: If "record_id" refers to any sort of TABLE, TR, TD and so on element, this won''t work in IE. You need to use table-specific DOM manipulation commands in that case. -Thomas Am 09.03.2006 um 05:17 schrieb Ignacio Sandejas:> Hi all, > > Can anyone tell me why this line of code works in FF but not IE?? > function stuff(id){ > record_id=$(id); > record_id.innerHTML = "foo"; > } > > I get a ''Runtime Error''. > -- > ----------------------- > Iggy Sandejas > Web Developer > 0419 485 252 > D-Frag Solutions > http://www.dfrag.com.au > ----------------------- > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thomas, You got it right. It refers to a <tr>. Looks like I have some rewriting to do! Thomas Fuchs wrote:> Guess: > > If "record_id" refers to any sort of TABLE, TR, TD and so on element, > this won''t work in IE. You need to use table-specific DOM manipulation > commands > in that case. > > -Thomas > > Am 09.03.2006 um 05:17 schrieb Ignacio Sandejas: > >> Hi all, >> >> Can anyone tell me why this line of code works in FF but not IE?? >> function stuff(id){ >> record_id=$(id); >> record_id.innerHTML = "foo"; >> } >> >> I get a ''Runtime Error''. >> ------------------------- >> Iggy Sandejas >> Web Developer >> 0419 485 252 >> D-Frag Solutions >> http://www.dfrag.com.au >> ----------------------- >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >
On 3/9/06, Thomas Fuchs <t.fuchs-moWQItti3gBl57MIdRCFDg@public.gmane.org> wrote:> If "record_id" refers to any sort of TABLE, TR, TD and so on element, > this won''t work in IE. You need to use table-specific DOM > manipulation commands > in that case.I believe you /can/ use innerHTML on a TD/TH in IE. Another problematic element I''ve seen mentioned is SELECT. Todd