Godaddy.com has some javascript or something that makes it auto select the first radio button of any group, no matter which you select.
Seems to be the missing </label> tags. Here is a simpler example: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>untitled</title> <meta name="generator" content="TextMate http://macromates.com/"> <meta name="author" content="Steven W Riggins"> <!-- Date: 2007-06-20 --> </head> <body> <form style="margin: 0px;" name="frmMain" id="frmMain" method="post" action="https://www.godaddy.com/gdshop/hosting/build.asp?display=virtual"> <!-- <input type="hidden" name="ci" value="1480"> <input type="hidden" name="byos" value=""> --> <div style="padding-left:10px;"> <input type="radio" name="chkPlan" id="economy_1" value="economy_1"><label for="economy_1"> 1 month, <b>just $29.99/mo</b> <input type="radio" name="chkPlan" id="economy_6" value="economy_6"><label for="economy_6"> 6 months, <b>just $29.99/mo</b> <input type="radio" name="chkPlan" id="economy_12" value="economy_12"><label for="economy_12">12 months,<b> just $25.49/mo</b> <b class="red">SAVE 15%</b> <input type="radio" name="chkPlan" id="economy_24" value="economy_24"><label for="economy_24">24 months,<b> just $23.99/mo</b> <b class="red">SAVE 20%</b> </div> </form> </body> </html>
Created attachment 15157 [details] A simpler html example
(In reply to comment #1) > Seems to be the missing </label> tags. Confirmed, the unclosed <label> tags are nesting on Safari 3.0 (522.11) on Mac OS X 10.4.10 (8R218). Marking as a regression since hitting just the radio buttons (not the label text) in Safari 3.0 (522.11) is broken compared to Safari 2.0.4 (419.3). You may see the behavior in Hixie's Live DOM Viewer: http://software.hixie.ch/utilities/js/live-dom-viewer/ On Firefox 2.0.0.4, the unclosed <label> tags are closed when another <label> tag is encountered. I'm not sure if this strategy will work on WebKit since the radio buttons themselves appear to be responding to the <label> tags as well.
<rdar://problem/5286443>
Interestingly, the reduction does not behave correctly in Firefox either. The failure doesn't seem quite as spectacular as it is in Safari, though.
The spec (http://www.w3.org/TR/html4/interact/forms.html#h-17.9) indicates that a closing tag is required. Firefox also behaves strangely with this test case, but their behavior actually seems the best way to error-handle this given the description in the spec.
Actually, Firefox still seems wrong.
Firefox behaves "correctly" when you click the label text. ("Correctly" means that the button you would expect to be selected is selected.) It behaves "incorrectly" when you click the actual radio button. WinIE behaves "correctly" in both cases/
I have done a bit of testing, and it looks like IE might close the <label> tag right after the text content if the <label> has a for attribute. Without a for attribute, it looks like they close the <label> when a new <label> is encountered. This behavior makes sense to me, and seems to make sense in the context of the spec too.
Using the Live DOM Viewer I was unable to detect any difference in WinIE with respect to closing of <label> elements with or without for="" attributes. Indeed it seems to nest <label> elements happily regardless of what is going on.
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%3Cbody%3E%3Cform%3E%3Cdiv%3E%0A%3Cinput%20name%3D%22chkPlan%22%20type%3D%22radio%22%20id%3D%22economy_1%22%3E%3Clabel%20for%3D%22economy_1%22%3E%20a%0A%3Cinput%20name%3D%22chkPlan%22%20type%3D%22radio%22%20id%3D%22economy_6%22%3E%3Clabel%20for%3D%22economy_6%22%3E%20b%0A%3Cinput%20name%3D%22chkPlan%22%20type%3D%22radio%22%20id%3D%22economy_12%22%3E%3Clabel%20for%3D%22economy_12%22%3E%20c%0A%3Cinput%20name%3D%22chkPlan%22%20type%3D%22radio%22%20id%3D%22economy_24%22%3E%3Clabel%20for%3D%22economy_24%22%3E%20d%0A%3C/div%3E%3C/form%3E Safari parses it just like IE. The problem is that Safari runs the activation behaviour for all the things through which the event bubbles, not just the innermost one.
Indeed! I vow hereafter to use Hixie's DOM viewer before poking about with bunches of test cases and coming to faulty conclusions. /me repeats 100 times on the chalkboard.
I fixed this with r24953.