ballouta Posted October 19, 2008 Share Posted October 19, 2008 Hello I saw websites where you write smthg in the search field and press enter for begin search instead of using a 'go' button. How this can be done?! thank you Quote Link to comment Share on other sites More sharing options...
Zane Posted October 19, 2008 Share Posted October 19, 2008 as long as you have a submit button in your form Enter will work or at least it always has been that way with me Quote Link to comment Share on other sites More sharing options...
ballouta Posted October 19, 2008 Author Share Posted October 19, 2008 yes i know, but there are some sites where there's no a submit button Quote Link to comment Share on other sites More sharing options...
Zane Posted October 19, 2008 Share Posted October 19, 2008 you could look into the option of using onKeyup Quote Link to comment Share on other sites More sharing options...
haku Posted October 20, 2008 Share Posted October 20, 2008 Ya, they could be using 'onkeyup' with a check to see if the key pressed is the enter key. If it is, then it submits. This isn't a good method though, because it won't work if your users have javascript turned off. If you are going to use this method, then you should add a submit button, then hide the submit button with javascript when the page loads, so that users with javascript turned off can still use the form. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.