Click to See Complete Forum and Search --> : prompt for selection from dropdown??


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>

Shto
11-21-2003, 11:41 AM
I would put this in the Javascript forum I think you would get an answer quicker if it was there