Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

form submits to blank page on enter #6

Open
smith opened this issue Dec 4, 2009 · 1 comment
Open

form submits to blank page on enter #6

smith opened this issue Dec 4, 2009 · 1 comment

Comments

@smith
Copy link

smith commented Dec 4, 2009

If I submit the search form by pressing enter instead of clicking the button I am sent to a blank page.

To fix this, you could do

 $("#" + search_form).bind("submit", function (event) {
     event.preventDefault();
     Search.submit();
 });

Or something like that instead of putting the onclick handler inline on the button.

@smith
Copy link
Author

smith commented Dec 4, 2009

Ok, well apparently this doesn't happen always, so my fix above might not quite work. It may have happened before the DOM was ready, so maybe the submit needs to be disabled until it's ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant