Closed Bug 28143 Opened 25 years ago Closed 24 years ago

document.forms.formname.selectbox.selectedIndex=-1

Categories

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

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: displague, Assigned: pollmann)

References

Details

Attachments

(1 file)

<form name="test">
 <select name="sel" multiple>
  <option selected>1</option>
  <option selected>2</option>
  <option selected>3</option>
  <option selected>4</option>
 </select>
 <input type="button"
onclick="javascript:document.forms.test.sel.selectedIndex=-1;" value="clear">

In netscape this will clear the select box - as i have found no other way to do
this besides looping through all options and unselected them, this behavior
should be supported.  I did not see anything about it in the w3c dom, but that
doesn't mean much.
Component: Core → DOM Level 0
Product: Rhino → Browser
Reassign to DOM component.
Assignee: norris → vidur
QA Contact: cbegle → desale
Passing forms bug to pollmann.
Assignee: vidur → pollmann
Depends on: 28593
Fix checked in, I'll attach the test case...
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Attached file Test case
Clicking on the "Clear buttons" in the testcase should deselect any selected
options in the select.  If so, this bug is fixed.  Thanks!
verified with 2000-04-11-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: