D
Dabbler
I think my CustomValidator is failing because the client side script is not
finding the controls it refers to. The validator is supposed to insure at
least one phone number is entered. Here's my script:
function ClientValidatePhones(ctl, args)
{
var txtHPhone = document.getElementById ("tbHPhone").value;
var txtWPhone = document.getElementById ("tbWPhone").value;
var txtCellPhone = document.getElementById ("tbCellPhone").value;
if (txtHPhone.length > 0 || txtWPhone.length > 0 || txtCellPhone.length
}else{
args.IsValid = false;
}
}
tbHPhone, tbWPhone, tbCellPhone are textboxes inside an EditItemTemplate. Is
there another way to do this?
Thanks for any help with this.
finding the controls it refers to. The validator is supposed to insure at
least one phone number is entered. Here's my script:
function ClientValidatePhones(ctl, args)
{
var txtHPhone = document.getElementById ("tbHPhone").value;
var txtWPhone = document.getElementById ("tbWPhone").value;
var txtCellPhone = document.getElementById ("tbCellPhone").value;
if (txtHPhone.length > 0 || txtWPhone.length > 0 || txtCellPhone.length
args.IsValid = true;
}else{
args.IsValid = false;
}
}
tbHPhone, tbWPhone, tbCellPhone are textboxes inside an EditItemTemplate. Is
there another way to do this?
Thanks for any help with this.