kahlua17
11-21-2003, 08:55 AM
I have the following code to detect if an input box is blank, and prompts the user to enter in text. What I would like to find out is how to modify it to detect if an option from a dropdown box has been selected.
<script language="JavaScript">
<!-- Begin
function noEntry(){
a2=document.form.Option.value;
if((a2.length<1)||(a2.substring(0,6)=="******")){
alert("Please select an option");
document.form.Option.focus();
return false;
}
else { return true; }
}
//End -->
</script>
<script language="JavaScript">
<!-- Begin
function noEntry(){
a2=document.form.Option.value;
if((a2.length<1)||(a2.substring(0,6)=="******")){
alert("Please select an option");
document.form.Option.focus();
return false;
}
else { return true; }
}
//End -->
</script>