Autocomplete problem using form.submit()

They have: 2 posts

Joined: Jun 2004

I'm having a problem with autocomplete when I try to use the form.submit() method in an onsubmit event handler. The following javascript code, which we use for disabling form double-clicks, also disables the autocomplete functionality of IE for some reason:

<script type="text/javascript">

var clicked = false;

function placeOrder() {
if (!clicked) {
document.forms[0].submit();
clicked = true;
}
}
</script>

If the forms.submit() call of placeOrder is removed, autocomplete works fine for the form. Any ideas on why this is occuring would be greatly appreciated.

They have: 5,633 posts

Joined: Jan 1970

what 'bout this:

They have: 2 posts

Joined: Jun 2004

This does the trick - although I don't understand why the other way doesn't work. Thanks!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.