For some reason, the following code, doesn’t want to work.
It checks the first variable, but with out any connection for the value of the variable it prompts that there is a problem. Anyone knows why? and what should I do?
Thanks in advanced, Oz.
<html>
<head>
<script type=”text/javascript”>
function checkform()
{
if (name==””)
{
alert(‘There is a problem with the first field’);
return false;
}
else if (email==””)
{
alert(‘There is a problem with…’);
return false;
}
return true;
}
</script>
</head>
<body>
<form name=”feedback” action=”
<input type=”text” name=”name”>
<input type=”text” name=”email”>
<input type=”submit” value=”next step”/>
</form>
<body>
</html>