i want to validate whether the checkbox is empty or not, if it is empty, the alert box show message, but the following code is not working...
function validate(form) {
with(form) {
if(agreement.value.checked==false)
{
alert("Please commit the agreement to continue.");
agreement.focus();
return false;
}
}
Secondly, i want user must enter one any filed from two fields, for this i am using the following code, but it also not working,
function validate(form) {
with(form) {
if(conPerP1.value=="" || conPerP2.value=="" )
{
alert("Please enter your telephone or cell no. to continue.");
conPerP1.focus();
return false;
}
}
please help me in this regard, i tried a lot to search through GOOGLE but in vain..
Thanks in advance.....