Validating checkboxes in java script


Knowing the limits of client-side scripting helps you decide whether to use client-side form validation.This article explains how to provide client-side validation for forms that you create either by hand or by using the form tools within Front Page.

validating checkboxes in java script-85validating checkboxes in java script-25validating checkboxes in java script-40

Lisa Wollin Microsoft Corporation May 2004 Applies to: Microsoft® Office Front Page® 2003 Microsoft Front Page 2002 Microsoft Front Page 2000 Summary: Learn how validate HTML form fields using Java Script in Microsoft Office Front Page 2003.

This article assumes a general understanding of HTML and Java Script.

We need to check if it is equal to null or “” because different browsers act differently so its better to check for both the conditions.

The following function checks whether the texbox with id name1 is empty, if empty it displays a message and highlights that textbox with red color.

Microsoft® Office Front Page® 2003 allows you to create some custom validation within the form feature.