Closed
Bug 68139
Opened 25 years ago
Closed 25 years ago
Radio-button values not available through JavaScript
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla0.9
People
(Reporter: dwallace, Assigned: jst)
References
Details
(Keywords: regression, Whiteboard: [HAVE FIX])
Attachments
(3 files)
932 bytes,
text/html
|
Details | |
965 bytes,
text/html
|
Details | |
1.43 KB,
patch
|
Details | Diff | Splinter Review |
I will try to attach my testcase after this. I am using the onClick attribute of
an anchor tag to call a JavaScript function that reads the value of a set of
checkboxes to build a URL. Apparently, "document.forms[0].radioid[i].value"
returns the value "on" for a checked checkbox. Netscape and IE return the value
attribute of that checkbox.
This may be related to http://bugzilla.mozilla.org/show_bug.cgi?id=65168 but
seems different enough that I am submitted a separate report.
Using Mozilla/5.0 (X11; U; Linux 2.2.18 i686; en-US; m18) Gecko/20010207
but I have been noticing the problem in nightlies for about a week now.
Comment 2•25 years ago
|
||
confirming, seeing on 2001020804 win98
->dom0 i believe
Assignee: rods → jst
Status: UNCONFIRMED → NEW
Component: Form Submission → DOM Level 0
Ever confirmed: true
Keywords: regression
OS: Linux → All
QA Contact: vladimire → desale
Comment 3•25 years ago
|
||
Confirming. On 2001020721 linux.
Simple call to document.FormName.RadioName[i].value returns "on" instead of
value. In talking with a few people on #mozilla it looks like
getAttribute('value') works.
Comment 4•25 years ago
|
||
![]() |
||
Comment 5•25 years ago
|
||
getAttribute('value') and .value do totally different things.
getAttribute('value') does the same thing as .defaultValue
Comment 6•25 years ago
|
||
johnny, might this be due to your checkin that returns "on" for .checked?
Assignee | ||
Comment 7•25 years ago
|
||
Assignee | ||
Comment 8•25 years ago
|
||
This is a regression I caused when fixing bug 44615, I thought I had tested the
fix in that bug in all cases I could think of but obviously I missed the obvious
case, duh!
Anyway, the attached patch fixes this problem w/o breaking the testcase in bug
44615.
Status: NEW → ASSIGNED
Priority: -- → P3
Hardware: PC → All
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla0.9
Comment 9•25 years ago
|
||
i think this should warrant 0.8 checkin, as a lot of sites use this for error
checking of forms. nominating for that and cc:'ing asa
Keywords: mozilla0.8
Assignee | ||
Updated•25 years ago
|
Summary: Checkbox values not available through JavaScript → Radio-button values not available through JavaScript
Comment 10•25 years ago
|
||
patch [ id=24785 ] look good. r=harishd
Comment 11•25 years ago
|
||
sr=vidur
Assignee | ||
Comment 12•25 years ago
|
||
*** Bug 68268 has been marked as a duplicate of this bug. ***
Comment 13•25 years ago
|
||
a=blizzard/asa for checkin to 0.8
Assignee | ||
Updated•25 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 14•25 years ago
|
||
Thanks for the reviews n' approvals, fix checked in.
Updated•25 years ago
|
Keywords: mozilla0.8
You need to log in
before you can comment on or make changes to this bug.
Description
•