Microsoft KB Archive/239470

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

Article ID: 239470

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Internet Explorer 5.0
 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Visual Basic, Scripting Edition 5.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.



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.



STATUS
This behavior is by design.



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.

