Closed Bug 16641 Opened 26 years ago Closed 26 years ago

onclick does not update form...

Categories

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

defect

Tracking

()

VERIFIED DUPLICATE of bug 18840

People

(Reporter: roland.mainz, Assigned: vidur)

Details

Attachments

(1 file)

We (eg. Ralf Schweiger) tried to get the following working under Mozilla 5 M10, but it seems that it does not produce the correct results. IE 5 does update the form radio if the matching form button is pressed. (BTW: NS4.7 failes, too) Any idea what's goig wrong here ? Why does IE5 work - and Moz. noz ? :-( testcase01.html: -- snip -- <html> <body> <form> <input type="radio" name="x"> <input type="button" value="ralf" onclick="x[0].clicked=true"> <input type="radio" name="x"> <input type="button" value="roland" onclick="x[1].clicked=true"> </form> </body> </html> -- snip --
Created attachment "testcase01.html". Added CC for Ralf.
Created attachment "testcase01.html". Added CC for Ralf.
Mhhh, something is going wrong with the CC field - it says the email isn't valid, but I cut&cpoied it from the X500 (and Ralf is alive =:-) email (manually for now): Ralf.Schweiger@informatik.med.uni-giessen.de
Assignee: mccabe → vidur
Component: Javascript Engine → DOM Level 0
Reassigning to the DOM component This looks a little like it could be a dup of 15133.
The original testcase uses "x[0].clicked=true". There's no 'clicked' attribute for an HTML Input element -- the boolean 'checked' determines whether a Checkbox or Radio element is checked. So the testcase should perhaps be: <html> <body> <form> <input type="radio" name="x"> <input type="button" value="ralf" onClick="x[0].checked=true"> <input type="radio" name="x"> <input type="button" value="roland" onClick="x[1].checked=true"> </form> </body> </html> which works fine in Netscape 4.7, but writes JavaScript Error: ReferenceError: x is not defined to stderr when either of the buttons is clicked under Linux (RH6.0) build 1999102010 ... but I'd have to defer to the DOM Masters as to whether 'x' is actually in scope in the onClick handler. It might be more correct to say <html> <body> <form> <input type="radio" name="x"> <input type="button" value="ralf" onClick="this.form.x[0].checked=true"> <input type="radio" name="x"> <input type="button" value="roland" onClick="this.form.x[1].checked=true"> </form> </body> </html> instead, but *that* won't work in current mozilla builds, either, producing: JavaScript Error: TypeError: this.form.x[0] has no properties because multiple form elements with the same name are not currently being reflected into an array with that name. See bug 12307 and bug 15361.
QA Contact: cbegle → desale
In an attempt to get my bug list in order again, marking all the bugs I have currently as ASSIGNED.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
*** This bug has been marked as a duplicate of 18840 ***
Status: RESOLVED → VERIFIED
Dup Verified.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: