[thelist] JavaScript Validation for Pull-Down Menus and Radio Buttons

Chris Heilmann lists at onlinetools.org
Wed Dec 8 09:56:04 CST 2004

> I am trying to learn how to do JS form field validation, and have hit a
> snag.  I have figured out how to validate text fields just fine, but I


Instead of putting all your validation code inside the HTML, it'll be a
lot easier to put it in one function. To select if one of the options was
selected in your select box, simply check the selectedIndex and see if it
is bigger than 0.

Chris Heilmann
http://icant.co.uk/ | http://www.onlinetools.org/

More information about the thelist mailing list