Closed Bug 91658 Opened 23 years ago Closed 23 years ago

[CBX]Extra option showing up when writing javascript select

Categories

(Core :: Layout: Form Controls, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: jesse.houwing, Assigned: rods)

References

()

Details

Attachments

(1 file)

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2+)
Gecko/20010714
BuildID:    20011071408

I noticed some very strange behaviour when working with javascript generated
pulldown menu's.

Depending on the syntax it results in an empty option (not in the source, but in
the browser)


Reproducible: Always
Steps to Reproduce:
See Additional information. It includes source

Expected Results:  It shouldn't show up this extra option

first I tried this:

<form>
<select>
<script>
for (something){
   doument.writeln("<option value=''>some text</option>");
}
</script>
</select>
</form>

This doesn't works in Mozilla and netscape 4.7, but results in one extar option
(an empty one) when viewed with mozilla.

Then I tried this:

<form>
<script>
document.writeln("<select>");
for (something){
   doument.writeln("<option value=''>some text</option>");
}
</script>
</select>
</form>

This results in a good pulldown (eg no extra options) in Mozilla, but fails to
show up at all in Netscape 4.7.

I finally chose to do create the pulldown code in PHP, this does fix it, but was
a hell of a lot extra effort.
->form controls
Assignee: karnaze → rods
Component: Layout → HTML Form Controls
QA Contact: petersen → madhur
tested on build id : 20010723 -- window2000

see attached testcase.
changing status to ==> New
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached file simplified testcase
I just tried, it also goes wrong with "multiple" selects on 1 line and
"multiple" selects over more than 1 line.
I have the  same problem with 
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012
and 
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.5) Gecko/20011011
The empty option is present always, additionally if I create <select>
tag using HMTL the other options are not selectable.
That would be bug 100511

jkeiser, this is fixed on the branch, right?
Nut still not in the latest nightly. Just checked the testcase, still wrong
Yeah, extra blank options are fixed with bug 34297 patch.  Setting dependent. 
Thanks!
Depends on: 34297
test after 34297 is checked in
Status: NEW → ASSIGNED
Summary: Extra option showing up when writing javascript select → [CBX]Extra option showing up when writing javascript select
Target Milestone: --- → Future
Fixed with bug 34297 landing.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed on
win2000 buildID: 2001-11-08-06-trunk
macOS 9.1 buildID: 2001-11-08-08-trunk
Status: RESOLVED → VERIFIED
*** Bug 110124 has been marked as a duplicate of this bug. ***
*** Bug 100996 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: