HTMLSelectElement.options.selectedIndex not supported

VERIFIED FIXED in M14

Status

()

Core
DOM: Core & HTML
P3
major
VERIFIED FIXED
19 years ago
18 years ago

People

(Reporter: cody, Assigned: Eric Pollmann)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PDT+] approved/reviewed fix in hand (will check in after bug 28691))

(Reporter)

Description

19 years ago
I tested one of my complex javascript programs using the Seamonkey 1999-9-25-13
(M10) nightly build on WinNT 4.0 SP 5.  Moz can't identify the selected index
in a select form field. Code snippet you can test.

<Script Language="Javascript">
function foobar() {
  if (document.outputdebug.foobie.options.selectedIndex == 0)
    window.alert("BAM!");
}
</script>
<form name="outputdebug"><select name="foobie" size="3">
<option name="1">BAM
</select>
<input type="button" onClick="foobar();" value="DoIt">
</form>

When I clicked on option 1 and hit the DoIt button, a "BAM!" alert should pop
up (tested in ie5) but in this build, does nothing.

Updated

19 years ago
Component: Javascript Engine → DOM Level 0
QA Contact: cbegle → desale

Comment 1

19 years ago
wrong component

Updated

19 years ago
Assignee: mccabe → vidur

Comment 2

19 years ago
Reassigning to owner of DOM Level 0 (sorry, vidur.)
Summary: Form selection field selectedIndex not working properly → [4.xP]HTMLSelectElement.options.selectedIndex not supported
I would expect "document.outputdebug.foobie.selectedIndex" to work, but not with
".options" in the middle.  For some reason, though, this does work in 4.x.  How
annoying.  I guess this should be supported somehow.

Changing title from "Form selection field selectedIndex not working properly" to
"[4.xP]HTMLSelectElement.options.selectedIndex not supported".  Since options is
an HTMLCollection, this might require some work.
(Assignee)

Updated

19 years ago
Assignee: vidur → pollmann
(Assignee)

Comment 4

19 years ago
Grabbing this one.
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
OS: Windows NT → All
Hardware: Other → All
Target Milestone: M11
(Assignee)

Comment 5

19 years ago
Moving non-critical bugs out.
(Assignee)

Updated

18 years ago
Target Milestone: M12 → M14
(Assignee)

Comment 6

18 years ago
Moving to M14 see bug 16879 for reasons why.

Comment 7

18 years ago
*** Bug 23087 has been marked as a duplicate of this bug. ***

Comment 8

18 years ago
Setting seviarity to major.
Severity: normal → major

Comment 9

18 years ago
Setting the keyword all open [4.xp] bugs to 4xp.
Keywords: 4xp

Updated

18 years ago
Keywords: beta1

Comment 10

18 years ago
Putting on PDT+ radar for beta1.
Whiteboard: [PDT+]

Updated

18 years ago
Summary: [4.xP]HTMLSelectElement.options.selectedIndex not supported → HTMLSelectElement.options.selectedIndex not supported
(Assignee)

Updated

18 years ago
Whiteboard: [PDT+] → [PDT+] 11-Feb-2000
(Assignee)

Comment 11

18 years ago
I brought the changes forward into my tree and they almost work (one bug I'm
working on in setLength for bug 16879).  Will update status later today.  

(Performance is better, but not great.)
Whiteboard: [PDT+] 11-Feb-2000 → [PDT+] 15-Feb-2000
(Assignee)

Comment 12

18 years ago
Fix for this bug and bug 16879 is ready.  I touched the following files (!=new)
Will need a code review (I'll hit Vidur up for one) and approval.

dom/public/idl/html/
! nsHTMLOptionCollection.idl
  nsHTMLSelectElement.idl
  makefile.win
  Makefile.in

dom/public/html/
  nsIDOMHTMLSelectElement.h
! nsIDOMNSHTMLOptionCollection.h
  makefile.win
  Makefile.in
  MANIFEST

dom/src/html/
  nsJSHTMLSelectElement.cpp
! nsJSNSHTMLOptionCollection.cpp
  Makefile.in
  makefile.win
(add to dom/macbuild/dom.mcp)

layout/html/content/src/
  Makefile.in
  makefile.win
! nsHTMLOptionCollection.cpp
! nsHTMLOptionCollection.h
  nsHTMLOptionElement.cpp
  nsHTMLSelectElement.cpp
! nsHTMLSelectElement.h
(add to layout/macbuild/layout.mcp)

layout/html/forms/src/
  nsListControlFrame.cpp

extensions/wallet/src/
  wallet.cpp
Whiteboard: [PDT+] 15-Feb-2000 → [PDT+] Fix in hand, need code review / approval
(Assignee)

Comment 13

18 years ago
Got a review from Vidur for this yesterday.
Whiteboard: [PDT+] Fix in hand, need code review / approval → [PDT+] Fix in hand, need approval
(Assignee)

Updated

18 years ago
Whiteboard: [PDT+] Fix in hand, need approval → [PDT+] approved/reviewed fix in hand (will check in after bug 28691)
(Assignee)

Comment 14

18 years ago
Just checked in the fix.  This also fixed bug 16879.
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 15

18 years ago
verified with 02-29-09.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.