erikTsomik
asked on
javascript validation
I am trying to validate the dropdwon that consists states and I also do the brake down by country. So when I select Select option it is validating properly , if I do select United State it does not validate at all
<select name="state" id="state" class="textbox">
<option value="" <cfif attributes.SelectedState eq "">selected</cfif>>-- Select -- </option>
<option value="" >--United States--</option>
<option value="AL" <cfif attributes.SelectedState eq "AL">selected</cfif>>Alabama </option>
</select>
if (validate[i].ruleType == "selectReq") {
if (valueSelect(validate[i].fieldName) == false) {
alert(validate[i].alertText);
thisField.focus();
Passed = false;
break;
break;
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can pass 0 to the united states and add on emore condition using the
Open in new window