Originally Posted By: tonyc
I also happened upon this little tip earlier in the week. For keyword search bookmarks, you can use some simple javascript to go to different URLs depending on whether you supply a keyword or not. e.g. for Wikipedia, I have keyword "wp" set to:

javascript:if('%s')%20location.href='http://en.wikipedia.org/wiki/Special:Search?search=%s';else%20location.href='http://en.wikipedia.org/wiki/Main_Page';

So, if I just type "wp" I go to the main wikipedia page, but if I supply a keyword, it searches for it. Soemthing I always thought would be nice but didn't realize was possible until now.

Doesn't the search engine keyword feature do this already? I guess it doesn't do the if no search terms then go to main page part.


Edited by tman (16/01/2010 22:09)