Closed Bug 15910 Opened 21 years ago Closed 21 years ago

scope relationship between select object and enclosing objects is bad

Categories

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

defect

Tracking

()

VERIFIED DUPLICATE of bug 15133

People

(Reporter: mike+mozilla, Assigned: vidur)

Details

Jeff Dyer reports

The problem with sclock.html is that when the JavaScript engine is
invoked to execute the select object's onchange handler, the reference
to 'form1' is not being found. The simplified code looks like this:

<FORM NAME="form1">...
<SELECT NAME="chand" SIZE="1"
onChange="setHandColor(form1)"
>
</SELECT>
</FORM>

If this reference to 'form1' is rewritten as 'document.form1' it works
fine. This indicates that the nested scope relationship between the
select object (and possibly other input objects) and its outer objects
(ie. form-
>document->window) are not properly initialized. The modified
html works because the engine searches the global window scope that
contains 'document' by default. The module owner for this should be Mike
McCabe. The code I'm working with is a daily build downloaded on 9/7.
Let me know if there is anything else I can help with.
Thanks,

Jeff


I've verified that this problem occurs on recent builds of Mozilla.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 15133 ***
Status: RESOLVED → VERIFIED
Duplicate. Verified.
You need to log in before you can comment on or make changes to this bug.