Closed
Bug 67144
Opened 24 years ago
Closed 24 years ago
[DUP]All whitespace in <option> value in <Select> trimmed
Categories
(Core :: Layout: Form Controls, defect)
Core
Layout: Form Controls
Tracking
()
People
(Reporter: norman, Assigned: rods)
References
()
Details
Attachments
(1 file)
431 bytes,
text/html
|
Details |
The whitespaces in the "value" attribute in <option> tag is trimmed to only 1
space when it is manipulated using javascript. Please see the example below:
<HTML>
<HEAD>
<TITLE>Netscape 6</TITLE>
</HEAD>
<script language="javascript">
function showme()
{ alert(document.test.testoption[0].value)
}
</script>
<BODY BGCOLOR="#FFFFFF">
<form name=test method=get action=Toy>
<select name=testoption>
<option value="The Space is Trimmed">The
Space is Trimmed</option>
</select>
<input type=button value="Click Here" onclick=showme()>
</form>
</BODY>
</HTML>
![]() |
||
Comment 2•24 years ago
|
||
Actually, this just seems to be a problem with the way alert() handles spaces.
Try javascript:alert('a a a')
The extra spaces get munged for me on linux build 2001-01-29-08.
Summary: All whitespace in <option> value in <Select> trimmed → All whitespace in <option> value in <Select> trimmed
Comment 3•24 years ago
|
||
I see the same munging on WinNT. Changing OS to "All". Since alert()
is a DOM function, reassigning to DOM Level 0 for further triage.
I don't see any problem in the stand-alone JS shell:
js> print('a a');
a a
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: Javascript Engine → DOM Level 0
Ever confirmed: true
OS: Windows NT → All
QA Contact: pschwartau → desale
I am sorry that there is some mis-leading in my original post message.
The javascript is one of the problem I faced .However, what I want to point out
is that the whitespace in <option> value in <Select> is trimmed when submitting
to server.
Component: DOM Level 0 → HTML Form Controls
Comment 5•24 years ago
|
||
Over to rods.
Assignee: jst → rods
Severity: critical → normal
Hardware: PC → All
Assignee | ||
Comment 6•24 years ago
|
||
This is adup from way way back
Status: NEW → ASSIGNED
Summary: All whitespace in <option> value in <Select> trimmed → [DUP]All whitespace in <option> value in <Select> trimmed
![]() |
||
Comment 7•24 years ago
|
||
Indeed, this is a dup.
*** This bug has been marked as a duplicate of 59248 ***
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•