AJAX: How do I default an enter-press to a non-submit button?

sonotleet

New member
I'd like to make a search bar were the user can press enter, and the results are posted without having to refresh the page.

If I make the "search" button a submit button, the page will refresh.

If I make the "search" button a regular button, the page will load the results without refreshing. But the user can't use the enter key to search.

Any ideas?
 
Back
Top