Click to See Complete Forum and Search --> : Checkbox validation


nickcrispini
10-03-2003, 11:30 PM
I'm new to Javascript so please bare with me.

I want the validate if a single checkbox has been checked.

I currently call a function when the form is submitted, for validation. The function checks to see if the input fields have been completed. I ideally want to confirm within the function if the a checkbox (there's only one) has indeed been checked or not.

Any suggestions will be appreciated.

Thanks.

Nick

Khalid Ali
10-04-2003, 12:14 AM
if(document.formName.checkboxName.checked){
alert("checked");
}else{
alert("not checked");
}