Something (or some things) are wrong with this. The purpose should be clear, but my code doesn't work. Anyone want to point out theobvious mistake(s)??
<html>
<head>
<script type="text/javascript">
function goToIt(){
if (document.myform.exper.value>="10") {window.location="http://whatever.com/oldenuf.html"}
return true;
}
else;
{window.location="http://whatever.com/nogood.html"}
return true;
}
</script>
</head>
<body>
<form name="myform" onSubmit="return goToIt()" method="get">
How many years experience do you have: <input type="text" name="exper" size="8">
<input type="submit" name="submit" value="Press to Continue">
</form>
</body>
</html>
<html>
<head>
<script type="text/javascript">
function goToIt(){
if (document.myform.exper.value>="10") {window.location="http://whatever.com/oldenuf.html"}
return true;
}
else;
{window.location="http://whatever.com/nogood.html"}
return true;
}
</script>
</head>
<body>
<form name="myform" onSubmit="return goToIt()" method="get">
How many years experience do you have: <input type="text" name="exper" size="8">
<input type="submit" name="submit" value="Press to Continue">
</form>
</body>
</html>
Comment