Help and Support
 

powered byLive Search

PRB: Cannot Call GetObject from Script in IE to Access Running Object

Retired KB ArticleThis article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
Article ID:239470
Last Review:December 12, 2003
Revision:3.0
This article was previously published under Q239470

SYMPTOMS

The GetObject function does not work when it is called from Microsoft Internet Explorer (IE) script.

Back to the top

CAUSE

You cannot use the GetObject function provided by VBScript and JScript when running scripts embedded within an HTML page. Internet Explorer disallows the use of this call because of security reasons.

Back to the top

STATUS

This behavior is by design.

Back to the top

MORE INFORMATION

Calling GetObject to get a running ActiveX object on a client system would be a large security risk because any running object on the system could be accessed without direct user permission, and is therefore not allowed by Internet Explorer. There is no way to change this behavior, either through code or manually by an end user.

Web developers should be aware of a similar security issue when trying to access the object model of an ActiveX Document hosted in a frame from script in another frame. Access to an embedded ActiveX Document object is restricted because the document object server may support features that can be used to circumvent Internet Explorer security.

Developers who need to programmatically manipulate embedded ActiveX Documents may do so by building an ActiveX control that hosts the ActiveX Document and providing methods or properties to get to the object model. Because the control must be downloaded and installed by the end user as a trusted component, this solution does not violate IE security.

Back to the top

REFERENCES

For additional information about security in Internet Explorer, click the article numbers below to view the articles in the Microsoft Knowledge Base:
195826 (http://support.microsoft.com/kb/195826/EN-US/) PRB: CreateObject Fails from Client-Side Scripts
167796 (http://support.microsoft.com/kb/167796/EN-US/) PRB: Permission Denied Error Message When Scripting Across Frames

Back to the top


APPLIES TO
Microsoft Internet Explorer 5.0
Microsoft Internet Explorer 4.0 128-Bit Edition
Microsoft Visual Basic, Scripting Edition 5.0

Back to the top

Keywords: 
kbactivedocs kbcontainer kbieobj kbprb kbwebbrowser KB239470

Back to the top

Article Translations

 

Other Support Options

  • Need More Help?
    Contact a Support professional by E-mail, Online or Phone.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.