Hi there!
i've got an html form and i want to make sure some fields are not empty before it gets submitted. i've read many examples and i've written some code but i have no idea why it doesn't work (it's as if the javascript script didn't exist). i don't know if it matters but i use php and it's a self submitting form. here's my code:
<script language="javascript" type="text/javascript">
function notEmpty(){
If (document.email.eponimo.value.length==0)
{
alert("some message");
document.email.eponimo.focus();
return false;
}
return true;
}
</script>
and a part of the form:
<form id="form" name="email" action="<?php echo $_SERVER['PHP_SELF'] ?>" onsubmit="return notEmpty()" enctype="multipart/form-data" method="post" >
<input type="text" name="eponimo" size="35" />
<input id="btn" name="Submit" type="submit" value="ΑΠΟΣΤΟΛΗ" />
thanks for your help