Closed
Bug 276490
Opened 20 years ago
Closed 19 years ago
Wrong Radio Button checked when name has underscores
Categories
(Firefox :: General, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: erwan, Assigned: bugzilla)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0 The following PHP code doesn't work for FF but should. It seems echo "<input type=\"radio\" name=\"db_id_moyen_paiement\" value=\"2\">A<br> <input type=\"radio\" name=\"db_id_moyen_paiement\" value=\"3\">B<br> <input type=\"radio\" name=\"db_id_moyen_paiement\" value=\"4\">C<br> <input type=\"radio\" name=\"db_id_moyen_paiement\" value=\"5\" CHECKED>D<br>"; It works when I change the name of the input button. Reproducible: Always Steps to Reproduce: 1. test PHP code in FF -> NOK 2. change name of input 3. test PHP code in FF -> ok Actual Results: It didn't check the last radio Expected Results: it should have checked the last radio seems that the name of input is the cause of the problem. when I changed the name to a shorter one (without _), it worked.
Comment 1•20 years ago
|
||
PHP ? Mozilla doesn`t understand PHP, only the HTML output. Do you have a html testcase (URL) ? never a blocker
| Reporter | ||
Comment 2•20 years ago
|
||
hmmm... seems that restarting FF fixes the issue. After a while it came back, in a different way (but selecting the wrong radio). Unfortunately, the code is related to payment and should be kept secure. i tried to isolate the faulty code, but it seems that it is related to activity in FF so it doesn't work. I'll try to capture the result and HTML next time I face it.
Updated•20 years ago
|
Severity: blocker → normal
Comment 3•20 years ago
|
||
Would you care to review Bug 265470 'Reloading a page with POSTed form data will result in incorrectly "checked" radio buttons' and/or similar bugs concerning reloading forms. Does your receipe involve Reloading? Does it involve the POST method? It may be tedious but you may find it essential to produce a valid test-case before being sure that what you are seeing is not a dup.
Comment 4•19 years ago
|
||
No response from reporter, resolving as WFM. Please reopen if this is still an issue in a recent trunk build.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → WORKSFORME
Comment 5•11 years ago
|
||
No, this does not work. If you have multiple sets of radio buttons and the names have underscore, Firefox gets confused. Using these names, the Boys and Girls radio buttons are treated separately... both Boys and Girls get checked: <input name="U11GirlsDisabled" type="radio" value="false" checked="checked">Show U11 Girls <input name="U11GirlsDisabled" type="radio" value="true">Hide U11 Girls <input name="U11BoysDisabled" type="radio" value="false" checked="checked">Show U11 Boys <input name="U11BoysDisabled" type="radio" value="true">Hide U11 Boys But, if you have underscores, both sets seem to be getting combined... only the Boys is "Checked": <input name="U11_Girls_Disabled" type="radio" value="false" checked="checked">Show U11 Girls <input name="U11_Girls_Disabled" type="radio" value="true">Hide U11 Girls <input name="U11_Boys_Disabled" type="radio" value="false" checked="checked">Show U11 Boys <input name="U11_Boys_Disabled" type="radio" value="true">Hide U11 Boys It seems like it's only looking at the name value before the first _... which means it things all 4 radio buttons are named "U11". This IS a real bug... and a stupid one!
You need to log in
before you can comment on or make changes to this bug.
Description
•