where the first argument is either a collection of radio buttons, or the name of the button group.
The second argument is a reference to the containing form, though its only necessary if a string is used for the first argument.
And I know my HTML isn't valid, but unless it directly affects my current problem then I'll handle it later.
There is a on Submit event that will be invoked when you press a submit button, call the validating code (keep that as a function) so that it will be invoked just before passing the data from the client to the server.
when submit button is pressed and no radio buttons have been selected, it alerts the user saying 'please select a check box', and if a radio button has been selected then simply submit the form, needs no alert.
Can only use HTML CSS and Java Script for this, I know it's 1000 times easier in jquery but sadly I can't use that.
There browsers, however, are often not smart enough to recognize the nesting, so it is worth putting them in to maximize the number of browsers in which the code will function.
That completes the coding of the radio buttons themselves.
To validate the radio button group with the name group1 we therefore pass form.group1 to the val Button function.