Perhaps someone can offer some assistance with some Javascript I placed in a web page. The purpose is to ensure that content has been entered in certain fields of an email form. This was done to avoid getting empty forms if someone clicks Submit without entering anything. Instead, they will be prompted to enter the required fields. I don't think this is a problem of a pop-up being blocked by FF because I get no alert that a pop-up is being blocked.
The Javascript code is:
<script language="javascript"
type="text/javascript">
<!-- hide script from older browsers
function validateForm(contact)
{
if(""==document.forms.contact.LastName.value)
{
alert("Please enter your last name.");
return false;
}
if(""==document.forms.contact.email.value)
{
alert("Please enter your email address.");
return false;
}
if(""==document.forms.contact.questions.value)
{
alert("Please enter your question or comment.");
return false;
}
}
stop hiding script -->
</script>
The <form> tag is :
<form name="contact" method="post" action="_gdForm/webformmailer.asp"
onSubmit="return validateForm(contact);">
Thanks in advance for your help.
