I can't get this script to work, what went wrong?
<script>
function check(){
if(form1.textfield.value==""
{
alert("Fill it in"
;
}
else{
form1.submit();
}
}
</script>
<form name="form1" method="post" action="another.asp">
<input type="file" name="file">
<input type="text" name="textfield">
<input type="button" name="Submit" value="Submit" onclick="check()">
</form>
<script>
function check(){
if(form1.textfield.value==""
alert("Fill it in"
}
else{
form1.submit();
}
}
</script>
<form name="form1" method="post" action="another.asp">
<input type="file" name="file">
<input type="text" name="textfield">
<input type="button" name="Submit" value="Submit" onclick="check()">
</form>