[thelist] IE javascript question
Lee Kowalkowski
lee.kowalkowski at googlemail.com
Mon Jul 2 13:24:05 CDT 2007
On 02/07/07, Jeffrey Barke <jeffrey.barke at themechanism.com> wrote:
> Eduardo,
> > <div id="EX_AATD" class="hiding"><label> <input type="checkbox"
> > name="EX_AATD">Item 1</label></div>
> The div has the same id as the checkbox has name. This is bad,
> because IE returns an element with a name attribute that is equal to
> the id specified.
Not when using getElement(s)By* it doesn't...
> > But I'm not calling the INPUT by ID, I'm calling the DIV, and
> > accessing its childNodes[0].childNodes[1] (the INPUT), as shown in
> > Firebug and working in Firefox.
Firefox will create text nodes for child nodes, IE won't. In IE it'll
be childNodes[0].childNodes[0] or firstChild.firstChild.
A consistent solution would be tmp.getElementsByTagName('input')[0].
--
Lee
More information about the thelist
mailing list