www.fgks.org   »   [go: up one dir, main page]

Click to Rate and Give Feedback
Methods
 AddSearchProvider Method
AddSearchProvider Method

Adds a search provider to the registry.

Syntax

window.external.AddSearchProvider(sUrl)

Parameters

sUrl Required. String that specifies an absolute or relative URL to the OpenSearch Description World Wide Web link file for the search provider.

Return Value

No return value.

Remarks

AddSearchProvider was introduced in Windows Internet Explorer 7.

This method opens a dialog box that enables the user to add the provider to their registry, and optionally set it as the default search provider. The maximum number of search providers that can be installed is 200.

The sUrl parameter allows http:, https:, or ftp: protocol schemes only. Additionally, the URL must be in a security zone that permits downloading.

Search providers must use the HTTP GET request method; the POST request method is not supported.

Examples

The following HTML implements a button that the user can click to install a search provider:

<INPUT TYPE="button" VALUE="Add Search Provider"
   >

The content of "Provider.xml" follows the OpenSearch Description World Wide Web link file format. The following description file adds MSDN as a search provider:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>MSDN</ShortName>
<Description>MSDN Search</Description>
<Url type="text/html"
   template="http://search.msdn.microsoft.com/search/results.aspx?view=msdn&amp;qu={searchTerms}"
/>  
</OpenSearchDescription>

Standards Information

There is no public standard that applies to this method.

Applies To

external

See Also

Search Provider Extensibility in Internet Explorer 7
Community Content
 
Add Community Content
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker
DCSIMG