PRB: Internet Explorer Returns Object Required: 'Explorer'ID: Q166367
|
When attempting to run a script in Internet Explorer versions 3.02 and 4.0 that references the Explorer property on the document object, the following error occurs:
<script engine> runtime error. Line <n>: Object required: 'Explorer'
The Explorer property was removed from the HTML scripting object model.
This behavior is by design.
Prior to version 3.02 of Internet Explorer, the Explorer property was an
undocumented property of the HTML Scripting Object Model document object.
While the Explorer property has been used in some cases in a positive way
by content providers, it is possible to use it in ways that lead to a
negative experience for the end-user. An example of this can be illustrated
using the explorer.fullscreen property. An end-user viewing a page that
kicks the browser into full-screen (kiosk) mode may lack the technical
experience to regain control of the browser and may end up having to
reboot.
Microsoft makes every effort to provide alternative means to achieve
legitimate results that are possible through the use of the Explorer
property. Below is a list of the common uses for the Explorer property and
the corresponding script-based workaround, which achieves similar results.
The examples are written in VBScript; however, they can be converted easily to JScript.
<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 script
immediately. The script loads the specified URL into a new maximized window that contains no menu bar, toolbar, or status bar. The initial window that
executed the script is closed.
Function DoTopLeftHeightWidth()
window.open "<LINK TYPE="GENERIC" VALUE="http://example.microsoft.com",">http://example.microsoft.com",</LINK> "", _
"top=0,left=0,height=1,width=1"
window.close
End Function
Function DoOpenLimitAdornments()
window.open "<LINK TYPE="GENERIC" VALUE="http://example.microsoft.com",">http://example.microsoft.com",</LINK> "", _
"statusbar=no,menubar=yes,toolbar=no"
window.close
End Function
Function DoGoForward()
window.history.forward
End Function
Function DoGoBack()
window.history.back
End Function
Function DoLocationUrl()
msgbox location.href
End Function
Function DoLocationName()
msgbox window.document.title
End Function
Function DoNavNoHistory()
window.location.replace("<LINK TYPE="GENERIC" VALUE="http://example.microsoft.com")">http://example.microsoft.com")</LINK>
End Function
Function DoUserAgent()
MsgBox navigator.userAgent
End Function
Function DoRefresh()
location.reload()
End Function
Microsoft has determined that there is no script-based workaround for
executing the following methods or retrieving the values of the following
properties:
<OBJECT ID="Accessor1"
CLASSID="CLSID:354154AE-9BFE-11D0-A6D0-00AA00A70FC2"
CODEBASE=
"http://activex.microsoft.com/controls/iexplorer/x86/iwebacc.dll">
</OBJECT>
Accessor1.GoHome
Accessor1.GoSearch
Accessor1.height
...
Additional query words: explorer object
Keywords : kbIE400 kbIE302 kbIE500 AXSDKIEScripting AXSDKScripting
Version : 3.02, 4.0
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 29, 1999