AutoScan method (external)
7 |
Attempts to find a Web site based on the specified domain part.
The AutoScan method iterates through the patterns located under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\UrlTemplate in the system registry and creates URL addresses based on the patterns and the specified domain part (the '%s' substrings in the patterns are replaced with the specified domain part).
The AutoScan method tries to connect to the created URL in each step and if it succeeds, then stops the iteration and loads the page into the window identified by the third parameter.
If no valid URL is found, it opens the page specified by the second parameter.
The following patterns are specified in the system registry by default:
- www.%s.com
- www.%s.org
- www.%s.net
- www.%s.edu
This method does not work in Internet Explorer from version 7 and raises an exception.
Syntax:
You can find the related objects in the Supported by objects section below.
Parameters:
Required. String that specifies the domain part. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional. String that specifies the location of the default page that will be displayed if no matching web site is found. If this parameter is not specified and no match is found, the default error page will be displayed. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional. String that identifies the target window where the page needs to be displayed.
One of the following values:
|
Return value:
This method has no return value.
Example HTML code 1:
This example illustrates the use of the AutoScan method.
|
||||
<head> <script type="text/javascript"> function FindPage () { try { window.external.AutoScan ("dottoro", "", "_blank"); } catch (e) { alert (e.message); } } </script> </head> <body> <button onclick="FindPage ();">Find dottoro home page</button> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
Related pages:
External links:
User Contributed Comments