|
-
May 21st, 2007, 02:35 AM
#1
Thread Starter
Member
how to validate three checkboxes?
how do u validate three checkboxeS?
i can only validate two checkboxes.
these are the code that i m using to validate two checkboxes. these codes work when i want to validate two checkboxes.
else if((PaymentBy[0].checked == false) && (PaymentBy[1].checked == false)
{
alert('Please state the method of payment');
return false;
}
else{
return true;
}
</script>
<body>
<input name="PaymentBy" type="checkbox" value="cash" />
<input name="PaymentBy" type="checkbox" value="credit card" />
<input name="PaymentBy" type="checkbox" value="company" />
<input type="submit" name="submit" value="Submit">
</body>
but now, i just want to validate three checkboxes. can someone shine the light over here?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|