prompt for selection from dropdown??

admin

Administrator
Staff member
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.<br />
<br />
<script language="JavaScript"><br />
<!-- Begin<br />
<br />
function noEntry(){<br />
a2=document.form.Option.value;<br />
<br />
if((a2.length<1)||(a2.substring(0,6)=="******")){<br />
alert("Please select an option");<br />
document.form.Option.focus();<br />
return false;<br />
}<br />
else { return true; }<br />
}<br />
<br />
//End --><br />
</script><!--content-->I would put this in the Javascript forum I think you would get an answer quicker if it was there<!--content-->
 
Back
Top