I have an asp page,App3, which has a combo box, defined as below
<SELECT NAME="Section7_NewAccessType" onClick="return extracheck(this)"><OPTION><OPTION>Vehicular<OPTION>Pedestrian</SELECT>
I have a separate file, called Validationserver.js, which contains all my java functions. These are called on my App3 asp page. They all work bar my combo box one. It is called from App3 as follows
ErrorMsg += combocheck(formToValidate.elements("Section7_NewAccessType");
The function combocheck, held within Validationserver.js is written as follows
function combocheck(combofield)
{
var accesschoice
accesschoice = combofield.selectedIndex
if(combofield.options[accesschoice].value==""
{
return "You have not completed the " + combofield.name + " field\n";
}
{
return "";
}
}
When I run the page, and leave the combo box empty, sure enough the error message is called. The problem is when I choose a menu item, the error message is still called? despite the fact it is not a ""
any ideas much appreciated
Richey
<SELECT NAME="Section7_NewAccessType" onClick="return extracheck(this)"><OPTION><OPTION>Vehicular<OPTION>Pedestrian</SELECT>
I have a separate file, called Validationserver.js, which contains all my java functions. These are called on my App3 asp page. They all work bar my combo box one. It is called from App3 as follows
ErrorMsg += combocheck(formToValidate.elements("Section7_NewAccessType");
The function combocheck, held within Validationserver.js is written as follows
function combocheck(combofield)
{
var accesschoice
accesschoice = combofield.selectedIndex
if(combofield.options[accesschoice].value==""
{
return "You have not completed the " + combofield.name + " field\n";
}
{
return "";
}
}
When I run the page, and leave the combo box empty, sure enough the error message is called. The problem is when I choose a menu item, the error message is still called? despite the fact it is not a ""
any ideas much appreciated
Richey