form element can't be referenced as array element

VERIFIED FIXED in M18

Status

()

Core
DOM: Core & HTML
P3
normal
VERIFIED FIXED
18 years ago
18 years ago

People

(Reporter: sean echevarria, Assigned: jst)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta2+][HAVE FIX])

Attachments

(1 attachment)

(Reporter)

Description

18 years ago
The use of the following expression does not work anymore in mozilla.  It 
stopped working during this week:

document ['listboxNavForm']['listboxNav_previous'];


Example context:

<form name="listboxNavForm">
    <a href="javascript://" onmouseover="arrowOver(-1); return true">
    <img src="arrow.gif" name="listboxNav_previous" width=22 height=19 hspace=5 
alt="previous" border=0 hspace=0 vspace=5></a>
</form>

<script language=javascript>
function arrowOver (_direction)
{
	var _arrowStr = (_direction == -1) ? 'previous' : 'next';
	alert(document ['listboxNavForm']);   // ok
	alert(document ['listboxNavForm']['listboxNav_' + _arrowStr]); // bad
	alert(document ['listboxNavForm']['listboxNav_' + 'previous']); // bad
	alert(document ['listboxNavForm']['listboxNav_previous']); // bad
}
</script>
(Reporter)

Comment 1

18 years ago
Created attachment 9847 [details]
testcase - 4 alerts, 3 no good in mozilla
(Reporter)

Comment 2

18 years ago
added 4xp and testcase keywords
Keywords: 4xp, testcase
(Reporter)

Comment 3

18 years ago
nominating nsbeta2.
Experienced this with a build after pulling from the tip 6/7 around noon.
Keywords: nsbeta2

Comment 4

18 years ago
We think may be a DOM, not javascript problem...reassignnig to jst to check out. 
 Johnny...what do ya think?
Assignee: rogerl → jst
Whiteboard: [NEED INFO]
(Assignee)

Comment 5

18 years ago
Mine mine mine, I broke it, I'll fix it.
Status: NEW → ASSIGNED
Component: Javascript Engine → DOM Level 0

Comment 6

18 years ago
Putting on [nsbeta2+] radar for beta2 fix.  Fix away my friend!
Whiteboard: [NEED INFO] → [nsbeta2+]
(Assignee)

Comment 7

18 years ago
I have a fix for this in my tree but I'll do some more testing before checking
in...
OS: Windows 2000 → All
Hardware: PC → All
Whiteboard: [nsbeta2+] → [nsbeta2+][HAVE FIX]
Target Milestone: --- → M18
(Assignee)

Comment 8

18 years ago
I just checked in the fix for this, marking FIXED.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
(Reporter)

Comment 9

18 years ago
verify fixed - thanks!

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.