Closed Bug 250297 Opened 21 years ago Closed 21 years ago

Form values not accessible from javascript

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 251494

People

(Reporter: todd, Assigned: dveditz)

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 The following HTML/javascript doesn't work properly: ----------- <html> <body> <form> <input type=radio name=foo value=1><span onclick="foo[0].checked=true" style="cursor:pointer">Foo 1</span><br> <input type=radio name=foo value=2><span onclick="foo[1].checked=true" style="cursor:pointer">Foo 2</span> </form> </body> </html> ----------- When I click on the label "Foo 1" or "Foo 2", I expect the radio button to be selected. Instead I get a javascript error that reads "Error: foo is not defined". I verified that this works in [Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115] and IE and Opera 7.51/Linux. Reproducible: Always Steps to Reproduce: 1. Save the HTML above 2. Click on "Foo 1" 3. View javascript error Actual Results: Javascript error Expected Results: Set the corresponding radio button
As far as I know this bug hasn't been looked at yet, so I'm hoping that changing components will help. At the very least I'd like someone to confirm whether or not this is a real problem since it seems pretty severe.
Component: Form Manager → JavaScript Engine
*** This bug has been marked as a duplicate of 251494 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.