Shortcut To Change Search Bar

Recently I received the below ques­tion from a read­er. I answered the read­er, but I thought I would also share the answer with any­one else who might be curious.

nice site. I’ve bor­rowed your blogroll code – its great by the way. Do you know how to link to the side­bar from a but­ton on the ‘links’ tool­bar (or even a short­cut) so that it will open in the explor­er bar? 

I’ve tried adding “target=_search” to the URL in the short­cut prop­er­ties. Also tried adding “” to the head sec­tion of the side­bar page. It works fine from a javascript link as in your sample.

MSDN has a com­plex method involv­ing reg­is­ter­ing COM objects but hope there might be an eas­i­er way. 

Here’s my response:

I can indeed help!

The but­tons on the links bar are just favorites/shortcuts, and short­cuts can con­tain JavaScript com­mands. Below is the code I use for a but­ton on my Links bar to open the Memes List:

javascript:void(_search=open(‘http://www.iampariah.com/projects/
memeslist_sidebar.php’,‘_search’))

If you copy that and paste it as one line into a new short­cut address field, it should work. I would rec­om­mend you paste it as is to test first. If that works, then cre­ate a new short­cut with your URL instead of the Memes List URL.

The key parts that can’t be changed are the ini­tial “_search” and end­ing “_search” because they spec­i­fy the spe­cial tar­get name IE uses inter­nal­ly to iden­ti­fy the Search bar.