Javascript code for validating radio buttons true blood anna paquin dating

All you need to do is to provide the second group of radio buttons with a different name to that used for the first group.

The name field determines which group that a particular button belongs to.

The correct way to refer to the form is document.forms['form-name-or-id'] or document.forms[n] where n is a number representing the 'n'th form in the document.

However, there's a simpler way if you modify how the function is called.

In actual fact the setup of these fields is the most simple of all form fields to validate as radio buttons set one value that only needs to be tested when the form is submitted.

The difficulty with radio buttons is that there are at least two and usually more fields that need to be placed on the form, related together and tested as one group.

var questions = 2; function validate(form) and call it with and styled with ol ol ol Or, if you're not interested in having inner numbering, change the nested lists to UL elements, and the second rule to: ol ul [snip] Hope that helps, Mike [1] And you shouldn't: forms should be identified using the id attribute unless you're supporting an old browser like NN4 which doesn't support ids.

-- Michael Winter Replace ".invalid" with ".uk" to reply by e-mail. : P An alternative way of writing it would be: function is Checked(group) which avoids the 'do'.

javascript code for validating radio buttons-9javascript code for validating radio buttons-24

Frankly its nonsense and most browsers treat it as an error.

Is there any quick fix that I can do to the code above to make it work in Netscape?

Sincerely, Marc Everything works excellent in Explorer, but refuses to work in Netscape (all versions).

The value that will be passed for a specific group when the form is submitted will be the value of the button within the group that is selected at the time that the form is submitted.

In order for the person filling out the form to understand what each radio button in our group does, we need to provide descriptions for each button.

Leave a Reply