Form Validation Code
I'm trying to get this code to work, could sombody please help me. It's supposed to be a validation code for a form.
---- this is ---- the form
</lj>
function validate(){
if (fieldname == ""){
alert("Message ...");
return false;
} else if(fieldname == ""){
alert("Message ...");
return false;
} else {
return true;
}
}---- this is ---- the form
<form action="mailto:" method="POST" enctype="text/plain" name="survey" onsubmit="return validate();">
<p>Name* <input type="text" name="visitor" size="40"></p>
<p>Email* <input type="text" name="email" id="email" size="40"></p><br>
<p><textarea name="thoughts" rows="10" cols="40" value="">Feedback</textarea></p>
<p><input type="submit" value="Send Feedback"></p>
</form></lj>
