Using the search bar in IE7 – Part 2

Alright, now we’ve found out how to make a search for CDW and the XML code to go along with it.  Now let’s have some fun it.
 
Take a page from Microsoft Support Page; if you go to that site, you’ll notice the arrow next to the search magnifying glass is yellow.  If you click it, you’ll notice three things:
  • "Microsoft Support Site" is a new entry that you never added
  • A little yellow sun next to "Microsoft Support Search"
  • An entry that reads "Add Search Providers" with a subentry "Microsoft Support Search"

If you change to that for the search provider, it will search the KB when you enter text.  In addition, you can permanently add by choosing "Add Search ProvidersMicrosoft Support Search", then it will always be available.  This is done by a simple line in the header:
     <link title="Microsoft Support Search" type="application/opensearchdescription+xml" rel="search" href="/common/opensearchdescriptor.aspx?ln=en-us" />

Looking at this entry in more detail, "Microsoft Support Search" is the text displayed, "application/opensearchdescription+xml" tells it what type of object we’re dealing with, "search" tells it where you want to put it, and "/common/opensearchdescriptor.aspx?ln=en-us" is a relative link to an ASP page the generates and returns an XML file.  Which just so happens to be:

<?xml version="1.0" encoding="UTF-8" ?>

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  <ShortName>Microsoft Support Search</ShortName>
  <Description>Search the Microsoft Support Knowledge Base</Description>
  </OpenSearchDescription>

This looks pretty similar to what we had from the custom search engine.  So, lets say I’m CDW and I want to add that feature to my pages.  Well, all I have to do is make an XML file, or an ASP page if I want to get fancy, and put a link tag in my header.  Say like:
    <link title="CDW Product Search" type="application/opensearchdescription+xml" rel="search" href="/productSearch.xml" />

Then whenever someone goes to the site they have the search engine available!

For example, you can go to my company site and see it in action.

-SMFX

This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Using the search bar in IE7 – Part 2

  1. Unknown says:

    Hi,Do you need digital signages, advertising displays, digital sign, advertisement displays and advertising players? Please go Here:www.amberdigital.com.hk(Amberdigital).we have explored and developed the international market with professionalism. We have built a widespread marketing network, and set up a capable management team dedicated to provide beyond-expectation services to our customers.
    amberdigital Contact Us
    website:www.amberdigital.com.hk
    alibaba:amberdigital.en.alibaba.com[bjcciffjgcbijf]

Leave a comment