[thelist] custom javascript HELP!
Barret A Monchka
bmonchka at hotmail.com
Sun Nov 19 15:38:38 CST 2000
Hello, I want to create a javascript that will present an alert box if the
drop down menu (select) contains nothing (""). I created the following
javascript, please let me know why it is not working.
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function emailselect() {
var selectemail = document.forms.validation.recipient.value;
if (selectemail == "")
{
alert("Please select a recipient.");
return false;
}
else
{
return true;
}
}
// End -->
</script>
Here is the html:
<form name="validation" action="FormMail.pl" method="POST"
onSubmit="return (checkrequired(this) && checkbae() && emailselect());">
and also:
<select name="recipient">
<option value="">-- Select --</option>
<option value="one at one.com">one</option>
<option value="two at two.com">two</option>
<option value="three at three.com">three</option>
</select>
Thank You,
Barret
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
More information about the thelist
mailing list