lulu50
asked on
Dropdown list
Hi,
I am validating my drop down list
if (DcFrm.DispStateBoxST.sele ctedIndex == 0)
{
errorMsg += "Select a state\n";
if (errorField==null) errorField=FRMAcc.DispStat eBoxST;
}
How can I say if it does not exist DcFrm.DispStateBoxST print error message
I am validating my drop down list
if (DcFrm.DispStateBoxST.sele
{
errorMsg += "Select a state\n";
if (errorField==null) errorField=FRMAcc.DispStat
}
How can I say if it does not exist DcFrm.DispStateBoxST print error message
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I want to say if the drop down has no option to select send an error message.
something like this but the code below is not working
if (!DcFrm.GetCity)
{
errorMsg += "Select a city\n";
if (errorField==null) errorField=FRMAcc.GetCity;
}
else
{
if (DcFrm.GetCity.selectedIndex == 0)
{
errorMsg += "Select a city\n";
if (errorField==null) errorField=FRMAcc.GetCity;
}
}
ASKER
Thanks
1. what do you need exactly
2. how is your form constructed (html code should be ok)
3. where do you get DcFrm