bugzilla.mozilla.org will be intermittently unavailable on Saturday, March 24th, from 16:00 until 20:00 UTC.

innerHTML & getElementsByTagName with NN6PR3




DOM: Core & HTML
18 years ago
10 years ago


(Reporter: violaine.lebeaupin, Assigned: jst)


Windows 95

Firefox Tracking Flags

(Not tracked)



(1 attachment)



18 years ago
I have a problem under NN6PR3. I make a Object bouton. I use
getElementsByTagName on HTML text existing after using of innerHTML. It
returns a free collection instead of a collection with one element.

My programs works with IE5 and with NN6PR2.

My test case is :


   function BoutonOnmouseup()
    var td = this.getElementsByTagName("TD");
    alert (this.id + " - " + td.length);

   function Bouton_afficher ()
    var contenu = "<TABLE>";
    contenu += "<TR>";
    contenu += "<TD STYLE='cursor:pointer;cursor:hand;'>test";
    contenu += "</TD>";
    contenu += "</TR></TABLE>";

    document.getElementById("test").innerHTML = contenu;
    document.getElementById("test").onmouseup = BoutonOnmouseup;

   function Bouton ()
    this.afficher = Bouton_afficher;


   function init ()
    var b = new Bouton();

 <BODY onload="init()">
  <DIV ID="test">

Comment 1

18 years ago
Created attachment 16874 [details]
Attachment containing above HTML snippet

Comment 2

18 years ago
I'm using Build 2000101020, but I've also had a look at NN6PR3.
If I understand you correctly, the problem you're having here is that in the
BoutonOnmouseup function, td.length has a value of 0, whereas in IE5 it has a
value of 1.
As far as I can see everything else is the same as in IE5.

Comment 3

18 years ago
his seems like a JS issue.  Tossing this hot potato over there.
Component: HTML Element → Javascript Engine
QA Contact: lorca

Comment 4

18 years ago
Changing QA contact appropriately.
QA Contact: pschwartau
Triaging clayton's list -> DOM core.
Assignee: clayton → jst
Component: Javascript Engine → DOM Level 1
QA Contact: pschwartau → janc

Comment 6

18 years ago
I believe the issue is that when invoked on any node _other_ than the #document
node, getElementsByTagName() in PR3 requires the tagname string parameter to be
in all lowercase. In PR2 (and in IE5), the string must be all uppercase. IMHO,
it should work either way, but since IE is stuck in all uppercase, NN6 needs to
be at least compatible with that.

Most of my developmental scripts for XML have broken in PR3 due to this issue.
I just tried the testcase with linux trunk build 2000103108 and I get the
following text in the alert box:

test - 1

This is the correct behavior right?

Reporter, could you retest with a recent build?  This may have been fixed....

Comment 8

18 years ago
Re-tested in Build 2000103104 in WinNT and I also get 'test - 1' which is the
correct behaviour and is also the same as IE 5.5.

Comment 9

18 years ago
I have tested with the build 2000103104 in Windows 98. This functionality works 
correcly now. Thanks.

Comment 10

18 years ago
Yup, this should be fixed now, marking FIXED.
Last Resolved: 18 years ago
Resolution: --- → FIXED
Component: DOM Level 1 → DOM HTML

Comment 11

17 years ago
QA contact Update
QA Contact: janc → desale

Comment 12

17 years ago
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala

Comment 13

17 years ago
verified ---looks fine for me 


10 years ago
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.