Microsoft KB Archive/314209

= You Cannot Access the Location Object of the Parent from a Child Window =

Article ID: 314209

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0
 * Microsoft Internet Explorer 6.0

-



This article was previously published under Q314209



SYMPTOMS
When a child window calls a function in its parent window in Microsoft Internet Explorer 6.0, the function may not access the window.location DOM object, all of the object properties and methods may stop responding (crash), and you may receive the following error:

Variable uses an automation type not supported by JScript



CAUSE
This problem occurs because a VARIANT in Internet Explorer 6.0 was not initialized before being used internally.



RESOLUTION
To resolve this problem, obtain the latest service pack for Internet Explorer 6. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

328548 How to Obtain the Latest Internet Explorer 6 Service Pack

The English-language version of this fix should have the following file attributes or later:   Date         Time         Version       Size       File name ---  07-Jan-2002  16:25 PM    6.00.2713.700  2,747,904  Mshtml.dll



STATUS
Microsoft has confirmed that this is a problem in Microsoft Internet Explorer 6. This problem was first corrected in Internet Explorer 6 Service Pack 1.



MORE INFORMATION
For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

http://msdn2.microsoft.com/en-us/ie/default.aspx

http://support.microsoft.com/iep

Steps to Reproduce the Problem
 Click Start, point to Programs, click Accessories, and then click Notepad.  Copy and paste the following code, and then save it as &quot;Parent.htm&quot; (without quotation marks):   Parent Window function accessProp { alert(location.protocol); alert(location.host); alert(location.hash); alert(location.href); alert(location.pathname); alert(location.port); alert(location.search); alert(location.hostname); } function accessFunc { location.reload(true); location.assign(&quot;http://www.microsoft.com&quot;); location.replace(&quot;http://msdn.microsoft.com&quot;); location.toString }   Open a child window </BODY> </HTML> </li> Click Start, point to Programs, click Accessories, and then click Notepad.</li>  Copy and paste the following code, and then save it as &quot;Child.htm&quot; (without quotation marks): Child Window <button onclick=&quot;window.opener.accessProp&quot;>Get all the location properties from parent <button onclick=&quot;window.opener.accessFunc&quot;>Get all the location methods from parent </li> Place parent.htm on your Webserver and access it from the Browser through http as follows:

http://localhost/parent.htm

</li> Click Open a child window, and the child.htm page will open in a new Internet Explorer window.</li> Click Get all the location properties from parent or Get all the location methods from parent in the child.htm page, and you will receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

This hotfix only works with versions of Internet Explorer 6.0 in which version of the Mshtml.dll file is lower than 6.00.2713.700. This hotfix is included in the February 11, 2000 cumulative security patch for Internet Explorer and later cumulative security patches. For additional information about the February 11, 2000 cumulative security patch for Internet Explorer, click the article number below to view the article in the Microsoft Knowledge Base:

316059 MS02-005: February 11, 2002, Cumulative Patch for Internet Explorer

Keywords: kbbug kbfix kbqfe kbie600presp1fix kbie600sp1fix kbhotfixserver KB314209

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.