Warren Systems, Inc.
F r e e w a r e

JavaScript

Netscape 6 users click here.

Please read the important disclaimer below!

Download!

Validate Required Radio Groups

I did not want to set the CHECKED state for any of the items in a Radio Group. (I realize that some browsers will default the first, but not all do!) Yet, I required a choice by the operator. This script will force a selection for radio groups if the name starts with "required". It works by building an array for each distinct Radio Group supplied by the input form. If a group is found with no items checked, the routine will alert the operator, set focus on the first item in the group, and return false. Download and Unzip ValidateRadio.zip. An example HTML file is included that uses the JavaScript routine.


This software is provided as is, with no warranty, neither expressed nor implied. While the author has made every attempt to provide error free code, back up your system first, and check on non-critical areas before use. Thank you.


Comments to: Webmaster@WarrenSystems.com
May 25, 2001
Copyright 2001 Warren Systems, Inc.
Privacy Statement