Closed Bug 5981 Opened 26 years ago Closed 25 years ago

window.length returns "Undefined".

Categories

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

x86
Windows 95
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: desale, Assigned: joki)

References

Details

(Keywords: testcase, Whiteboard: [nsbeta2-] [fixinhand][nsbeta3+])

Attachments

(1 file)

Using javascript command window.length should return number of frames which is "0" for code I'm providing, but it returns "Undefined". Product: seamonkey.[ apprunner/Viewer ]. Build: 05-04-08. OS: Win95, WinNT, Mac OS. Steps to Reproduce: 1] Please copy code I'm providing. 2] Save as HTML file and open this HTML file in apprunner as well as viewer. 3] This HTML file will show you number of frames on screen. [code uses window.length] Expected Results: Since this code does not have any frames, it should show window.length=0. Actual Results: It shows window.length=Undefined. Code: <html> <head> <title>Test Page</title> </head> <body > <form name="workform"> <SCRIPT LANGUAGE="JavaScript1.1"> document.writeln("<h3>"); document.writeln("Window.length = ? [Number of frames]"); document.writeln("</h3>"); document.writeln("Window.length = "); document.writeln(window.length); </SCRIPT> </form> </body> </html> End of Code.
Assignee: vidur → joki
Summary: window.length returns "Undefined". → window.length returns "Undefined".
This one's for you, Tom.
Whiteboard: [TESTCASE] window.length is undefined, window.frames.length is correct
[note: desale@netscape.com's test case only slightly altered] Overview Description: window.length returns "undefined" Steps to reproduce: load the attachment Actual Results: window.length is undefined, window.frames.length is 0 Expected Results: window.length==0 Build Date & Platform: occurs on M7 and current daily build doesn't occur on NN4.x Additional information: since window.frames.length works, maybe making window.frames.length "point" to window.length is a quick fix.
Status: NEW → ASSIGNED
Target Milestone: M14
Target Milestone: M14 → M17
Moving M17. Not required for beta.
Bulk moving [testcase] code to new testcase keyword. Sorry for the spam!
Keywords: testcase
*** Bug 34603 has been marked as a duplicate of this bug. ***
Nominating nsbeta2. We have to start drawing a line on DOM0 backward compatibility; these bugs are supposed to be a high priority for nsbeta2 per the beta2 criteria.
Keywords: nsbeta2
Nominating nsbeta2. We have to start drawing a line on DOM0 backward compatibility; these bugs are supposed to be a high priority for nsbeta2 per the beta2 criteria.
Setting to [nsbeta3+].
Whiteboard: [TESTCASE] window.length is undefined, window.frames.length is correct → [nsbeta3+] window.length is undefined, window.frames.length is correct
[nsbeta2-] nominating for nsbeta3
Keywords: nsbeta3
Whiteboard: [nsbeta3+] window.length is undefined, window.frames.length is correct → [nsbeta2-] window.length is undefined, window.frames.length is correct
Not sure why I thought this one was hard. Simple fix in hand.
Whiteboard: [nsbeta2-] window.length is undefined, window.frames.length is correct → [nsbeta2-] [fixinhand]
Updating Milestone to M18.
Target Milestone: M17 → M18
NN 4.x and IE 5.x both return 0 for window.length (and window.frame.length), so adding 4xp keyword. The Client-side JavaScript reference guide at developer.netscape.com defines window.length as "The number of frames in the window", so the fix seems correct.
Keywords: 4xp
Marking nsbeta3+...
Whiteboard: [nsbeta2-] [fixinhand] → [nsbeta2-] [fixinhand][nsbeta3+]
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Fixed
Verified with 2000-09-13-09.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: