You are currently offline, waiting for your internet to reconnect

PRB: Internet Explorer Returns Object Required: 'Explorer'

This article has been archived. It is offered "as is" and will no longer be updated.
Symptoms
When attempting to run a script in Internet Explorer versions 3.02 and 4.0that references the Explorer property on the document object, the followingerror occurs:
<script engine> runtime error. Line <n>: Object required: 'Explorer'
Cause
The Explorer property was removed from the HTML scripting object model.
Status
This behavior is by design.
More information
Prior to version 3.02 of Internet Explorer, the Explorer property was anundocumented property of the HTML Scripting Object Model document object.While the Explorer property has been used in some cases in a positive wayby content providers, it is possible to use it in ways that lead to anegative experience for the end-user. An example of this can be illustratedusing the explorer.fullscreen property. An end-user viewing a page thatkicks the browser into full-screen (kiosk) mode may lack the technicalexperience to regain control of the browser and may end up having toreboot.

Microsoft makes every effort to provide alternative means to achievelegitimate results that are possible through the use of the Explorerproperty. Below is a list of the common uses for the Explorer property andthe corresponding script-based workaround, which achieves similar results.The examples are written in VBScript; however, they can be converted easily to JScript.

explorer.fullscreen -

Internet Explorer can be started in kiosk mode by launching the browserwith the -k command line option. This is the only option for running thebrowser in kiosk mode.

To simulate kiosk mode, however, adapt the following code:
<HTML><BODY><SCRIPT LANGUAGE=VBSCRIPT>   window.open "http://example.microsoft.com", _      "","menubar=no,toolbar=no,status=no"   window.close</SCRIPT></BODY></HTML>				
Upon loading the HTML above Internet Explorer 3.02 executes the scriptimmediately. The script loads the specified URL into a new maximized window that contains no menu bar, toolbar, or status bar. The initial window thatexecuted the script is closed.

explorer.top, left, height, and width -

Another instance of the browser can be opened in a position specified inthe window.open method:
   Function DoTopLeftHeightWidth()      window.open "<WWLINK TYPE="GENERIC" VALUE="http://example.microsoft.com",">http://example.microsoft.com",</WWLINK> "", _         "top=0,left=0,height=1,width=1"      window.close   End Function				

explorer.statusbar, menubar, and toolbar -

Another instance of the browser can be opened with or without the controlbars present:
   Function DoOpenLimitAdornments()      window.open "<WWLINK TYPE="GENERIC" VALUE="http://example.microsoft.com",">http://example.microsoft.com",</WWLINK> "", _        "statusbar=no,menubar=yes,toolbar=no"      window.close   End Function				

explorer.goforward -

   Function DoGoForward()      window.history.forward   End Function				

explorer.goback -

   Function DoGoBack()      window.history.back   End Function				

explorer.locationurl -

   Function DoLocationUrl()      msgbox location.href   End Function				

explorer.locationname -

   Function DoLocationName()      msgbox window.document.title   End Function				

explorer.navigate(<url>,navNoHistory) -

   Function DoNavNoHistory()      window.location.replace("<WWLINK TYPE="GENERIC" VALUE="http://example.microsoft.com")">http://example.microsoft.com")</WWLINK>   End Function				

explorer.fullname or explorer.path -

   Function DoUserAgent()      MsgBox navigator.userAgent   End Function				

explorer.refresh and refresh2 -

   Function DoRefresh()      location.reload()   End Function				
Microsoft has determined that there is no script-based workaround forexecuting the following methods or retrieving the values of the followingproperties:
  • explorer.GoHome
  • explorer.GoSearch
  • explorer.height
  • explorer.width
  • explorer.top
  • explorer.left
  • explorer.busy
The above properties are exposed for those who need them via an ActiveXcontrol provided by Microsoft. To use the control, embed the following inyour Web page:
<OBJECT ID="Accessor1"   CLASSID="CLSID:354154AE-9BFE-11D0-A6D0-00AA00A70FC2"   CODEBASE=     "http://activex.microsoft.com/controls/iexplorer/x86/iwebacc.dll"></OBJECT>				

The properties and methods can then be accessed as follows:

Accessor1.GoHomeAccessor1.GoSearchAccessor1.height...				

explorer object
Properties

Article ID: 166367 - Last Review: 06/22/2014 18:16:00 - Revision: 4.0

  • kbnosurvey kbarchive kbprb KB166367
Feedback