[thelist] javascript gurus...help!

Adam Slesinger bread_man at hotmail.com
Mon Mar 26 14:45:18 CST 2001


This Javascript should do the trick for you.  My code isn't the best 
written, but it works. =]


<script language="JavaScript" type="text/javascript">

function ValidateForm(form){
		if ((form.textfield.value != "") && (form.dropdownmenu.value == "")) {
  	    	alert("Drop down menu can not be left blank.");
  	    	form.dropdownmenu.focus();
  	    	return;
  	    }
    	form.submit();
}

</script>

And then, put this for the submit button of your form:

<input type="button" value="Submit" onclick="ValidateForm(this.form)" />


adam
http://breadweb.net

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com





More information about the thelist mailing list