I'm trying to run a validator script from a submit that would check to make sure that all select boxes have a chosen value in them. The problem im having is that I cant just do a ..........
if (form.reason.value == "item" {
alert("You must select a reason"
form.reason.focus();
return false; }
where "reason" is the name of the select box. this page is built dynamically and the names of the select boxes are generated from XSL. So there aren't a set number of boxes or names that I can use to run this script on. i basically need to run a script(checking all select boxes no matter how many there are what name they might have) to make sure that they all have a value selected. Thanks for your help.
if (form.reason.value == "item" {
alert("You must select a reason"
form.reason.focus();
return false; }
where "reason" is the name of the select box. this page is built dynamically and the names of the select boxes are generated from XSL. So there aren't a set number of boxes or names that I can use to run this script on. i basically need to run a script(checking all select boxes no matter how many there are what name they might have) to make sure that they all have a value selected. Thanks for your help.