View Single Post
Old 07-05-2005, 05:33 PM   #1 (permalink)
redzone
Junior Member
 
Join Date: Jul 2005
Posts: 13
Default Javascript function submitting a form troubles

hello all,

I can't seem to pinpoint why my function fails. Maybe someone see's something I am missing.
PHP Code:
<html><head></head><body>

<
script type="text/javascript">
function 
checkSubmit() {
 if ( 
document.myform.myfield.value.length >= ) {
  
alert(document.myform.myfield.value.length);
  
document.myform.submit();
  return 
false;
 }
 else {
  return 
true;
 }
}
</script>

<form action="test.php" name="myform">
<input type="text" name="myfield" value="" onkeyup="checkSubmit()">
<input type="submit" name="submit" value="submit">
</form>

</body></html> 


thanks in advance
redzone is offline   Reply With Quote
Sponsored Links