Problem with div properties

RESOLVED INVALID

Status

()

--
major
RESOLVED INVALID
17 years ago
17 years ago

People

(Reporter: fahmy, Assigned: jst)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

17 years ago
Hi,

The below page can be successfully viewed with IE4, IE5, IE6, NS4, NS4.75
http://www.xlstat.com/popup.htm

It cannot with Mozilla 1.0 although the syntax is correct.

Regards,

Thierry Fahmy

Comment 1

17 years ago
Layers isn't supported by Mozilla.

Comment 2

17 years ago
The syntax is incorrect, just read
http://www.mozilla.org/docs/web-developer/faq.html.

This is invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → INVALID
(Reporter)

Comment 3

17 years ago
The bug on http://www.xlstat.com/popup.htm happens on line 
newsDiv = nouv.style;

nouv is the ID of the <DIV>. I think the syntax is correct
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
Summary: Problem with layers properties → Problem with div properties
No, it is not.  "nouv.style" means "window.nouv.style".  IE happens to export
every div with an ID into the global (window) namespace.  Mozilla does not, for
various reasons including not cluttering the global namespace.  Other browsers
may or may not do it, depending on the considerations of the developers.  It is
by no means guaranteed to work.

If you use "document.getElementById('nouv').style" that will work in every
browser you list except NS4.x and will also work in Mozilla and any other
DOM-compliant browser (Opera, Konqueror, etc). Since NS4 does not run that
branch anyway, this should be a safe change.

Comment 5

17 years ago
At any rate, this is a DOM issue, not a JS Engine issue.
Reassigning to DOM Level 0 -
Assignee: rogerl → jst
Component: JavaScript Engine → DOM Level 0
QA Contact: pschwartau → desale

Comment 6

17 years ago
And resolving as Invalid per Boris' observation in Comment #4.
Thierry, thank you for this report - 
Status: UNCONFIRMED → RESOLVED
Last Resolved: 17 years ago17 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.