Closed
Bug 56257
Opened 24 years ago
Closed 24 years ago
innerHTML & getElementsByTagName with NN6PR3
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: violaine.lebeaupin, Assigned: jst)
Details
Attachments
(1 file)
767 bytes,
text/html
|
Details |
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>
Comment 1•24 years ago
|
||
Comment 2•24 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.
his seems like a JS issue. Tossing this hot potato over there.
Component: HTML Element → Javascript Engine
QA Contact: lorca
Comment 5•24 years ago
|
||
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.
Comment 7•24 years ago
|
||
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•24 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. WFM.
Reporter | ||
Comment 9•24 years ago
|
||
I have tested with the build 2000103104 in Windows 98. This functionality works correcly now. Thanks.
Assignee | ||
Comment 10•24 years ago
|
||
Yup, this should be fixed now, marking FIXED.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•24 years ago
|
Component: DOM Level 1 → DOM HTML
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.
Description
•