Network Solutions WHOIS Search Plugin/Provider and JavaScript "addEngine"

be35563d22f14c09575a8192d50675fea52b4f1a

Sat 31 Jan 2009 07:00:00 -0800

I prefer Network Solutions’ WHOIS service over others because it appears to be one of the more complete and accurate WHOIS services available. Because I use this WHOIS search service a lot, I decided to put together a quick search plugin/provider for Chrome, Firefox and Internet Explorer.

Click here to add my Network Solutions WHOIS search provider to your browser.

In fact, building your own search plugin/provider for IE and other browsers is relatively simple. All you need is a small XML file that defines a few details about the provider, and a little JavaScript to trigger the install process. My Network Solutions WHOIS search plugin XML can be found here. If you need to Base64 encode an image/x-icon for the provider XML, I suggest using this converter.

Now, with regards to the JavaScript that triggers the search plugin installation in the browser (addEngine), take a look at this JavaScript example:

function addEngine(xml,icon,provider,cat) {
  if((typeof window.sidebar=="object") && (typeof window.sidebar.addSearchEngine=="function")) {
    window.sidebar.addSearchEngine(xml,icon,provider,cat);
  } else {
   try {
    window.external.AddSearchProvider(xml);
   } catch (x) {
    if(70==(x.number&0xFFFF)){
      alert("For security reasons, you must use the mouse" +
             "\n(or the Enter key) to click the Install button.");
    } else {
      alert("Unable to add search provider. [" + (x.number & 0xFFFF) + "]");
    }
    return false;
  }
 }
}

The call to window.external.AddSearchProvider() is for Internet Explorer. The call to window.sidebar.addSearchEngine() is for all other browsers.

Special thanks to Network Solutions for featuring my WHOIS browser plugin on their Network Solutions Labs homepage!