SharePoint 2010 Search - trigger with enter, not just magnifying glass.

Walter Curtis
Walter Curtis used Ask the Experts™
on
This should be easy - I have an Enterprise Search page using the Enterprise Search template. When a term is entered in to the search input box, the magnifying glass icon has to be clicked on to trigger search. Is there some way to configure the box so that just by pushing the "Enter" key will also trigger the search?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Awarded 2012
Commented:
Hi Sneeko,
long time no see?

Sorry but I have currently no running SharePoint 2010 site available.
But: is jQuery available on your search page?
Does this work perhaps on some browsers but not in Chrome?

Idea would be to inject JavaScript, get the search input box by ID and then forcing the search form submit (or the search button click) by capturing the key code on keypress.

Could you perhaps post the generated HTML code of that page?

Thanks, HTH and merry Christmas
Rainer
Walter CurtisSharePoint AED
Distinguished Expert 2018

Author

Commented:
Hello Rainer,

Thanks, that's what I needed just a good idea to jog my memory about how to do this. I even have a snippet somewhere about doing this. Many thanks and a Fröhliche Weihnachten!

wc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial