Closed Bug 56257 Opened 24 years ago Closed 24 years ago

innerHTML & getElementsByTagName with NN6PR3

Categories

(Core :: DOM: Core & HTML, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: violaine.lebeaupin, Assigned: jst)

Details

Attachments

(1 file)

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 :

<HTML>
 <HEAD>
  <SCRIPT>

   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();
    b.afficher();
   }
  </SCRIPT>
 </HEAD>

 <BODY onload="init()">
  <DIV ID="test">
  </DIV>
 </BODY>
</HTML>
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.
his seems like a JS issue.  Tossing this hot potato over there.
Component: HTML Element → Javascript Engine
QA Contact: lorca
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
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....
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.
WFM.
I have tested with the build 2000103104 in Windows 98. This functionality works 
correcly now. Thanks.
Yup, this should be fixed now, marking FIXED.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Component: DOM Level 1 → DOM HTML
QA contact Update
QA Contact: janc → desale
Updating QA contact to Shivakiran Tummala.
QA Contact: desale → stummala
verified ---looks fine for me 
Status: RESOLVED → VERIFIED
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.

Attachment

General

Creator:
Created:
Updated:
Size: