I have a form that takes a zipcode as input and displays a google map on the same page using ajax.
If I submit the form using a submit button, it works fine.
However, I would like to auto submit the form after 5 characters are entered.
This code works fine to submit the form:
<form id="zip" action="zip.php" method="post"> zip code: <input type="text" name="zipcode" onKeyUp="if(this.value.length>4)this.form.submit()"> </form>
but without using the submit button, it does not query zip.php replace the div on the current page with the google map. All it does is load the action page, zip.php.
Why does it work fine with a submit button, but not with this.form.submit
This has been driving me crazy!