A
Assimalyst
Hi,
I'm pretty new to javascript and i'm struggling to get a custom
validator working.
I have a dropdownlist populated by a datareader, the top value of which
is always "Please Select..." at index 0.
How can i code a validator to be invalid if "Please Select..." is
selected, but valid for any other value?
Here is my attempt:
function validateSurgeonNameDDL(oSrc, args)
{
args.IsValid = ([surgeonNameDDL.SelectedIndex].Value != "0");
}
However, this comes back invalid, for all selection.
Thanks.
I'm pretty new to javascript and i'm struggling to get a custom
validator working.
I have a dropdownlist populated by a datareader, the top value of which
is always "Please Select..." at index 0.
How can i code a validator to be invalid if "Please Select..." is
selected, but valid for any other value?
Here is my attempt:
function validateSurgeonNameDDL(oSrc, args)
{
args.IsValid = ([surgeonNameDDL.SelectedIndex].Value != "0");
}
However, this comes back invalid, for all selection.
Thanks.