Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Validate unchecked Check boxes in a form


Message #1 by anne.do@c... on Wed, 18 Dec 2002 09:50:51 -0500
	Make sure your form's name is JobRequisition and your checkbox's
names are NewPosition and Replacemnt, but I think you've made a typo
mistake.  I would say your second checkbox is Replacement instead of
Replacemnt.

	Beware of case-sensitivity and thus better use cut-n-paste.

	Furthermore, don't be lazy and write
document.JobRequisition.NewPosition.checked

	OTOH, since these options seem to be mutually exclusive, it's more
appropriate to use radio than checkbox.

> -----Message d'origine-----
> De : anne.do@c... [mailto:anne.do@c...]
> Envoy=C3=A9 : mercredi 18 d=C3=A9cembre 2002 15:51
> =C3=80 : javascript
> Objet : [javascript] Validate unchecked Check boxes in a form
>
>
> I want to check where the NewPosition and Replacement
> checkboxes are not
> checked.  This doesn't seem to work.  Please help?
>
> if ((JobRequisition.NewPosition.checked=3D=3Dfalse) &&
> (JobRequisition.Replacemnt.checked=3D=3Dfalse ))
> 	{
> 	alert("Please check whether this will be a new position or
> replacement.")
> 	return false;
> 	}
>
>
>
>

  Return to Index