Microsoft KB Archive/935579

= FIX: When you access an external document by using a link in an inline frame in Internet Explorer 7, the value of the document object is returned as &quot;undefined&quot; =

Article ID: 935579

Article Last Modified on 10/27/2007

-

APPLIES TO


 * Windows Internet Explorer 7

-



Important This article contains information about how to modify the registry. Make sure that you back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry



SYMPTOMS
Consider the following scenario:
 * You create a Web page in an inline frame.
 * The Web page contains a link to an external document such as a PDF file.
 * You use a script block to reference the document object.
 * You access the external document by using the link in the inline frame in Windows Internet Explorer 7.

In this scenario, the value of the document object is returned as &quot;undefined.&quot;

Note This problem does not occur if you use an inline script to reference the document object.



Security update information
To resolve this problem, install the most current cumulative security update for Internet Explorer. To install the most current updates, visit the following Microsoft Web site:

http://windowsupdate.microsoft.com

For more technical information about the most current cumulative security update for Internet Explorer, visit the following Microsoft Web site:

http://www.microsoft.com/technet/security/current.aspx

Note This fix was first included in security update 937143 (MS07-045). For more information, click the following article number to view the article in the Microsoft Knowledge Base:

937143 MS07-045: Cumulative Security Update for Internet Explorer

Prerequisites
You must have Internet Explorer 7 installed to apply this hotfix.

Restart requirement
You must restart the computer after you apply this hotfix.

Hotfix replacement information
This hotfix does not replace any other hotfixes.

File information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.

Registry information
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

After you apply this hotfix, you must enable this hotfix. To do this, follow these steps:  Make sure that you exit Internet Explorer. Click Start, click Run, type regedit in the Open box, and then click OK. Locate the following registry subkey, and then click the following registry subkey:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl

 On the Edit menu, point to New, and then click Key. Type FEATURE_DISCONNECT_WEBOC_WHEN_NOT_DOCHOSTING_KB935579, and then press ENTER. Click FEATURE_DISCONNECT_WEBOC_WHEN_NOT_DOCHOSTING_KB935579. On the Edit menu, point to New, and then click DWORD Value.</li> Type Iexplore.exe, and then press ENTER.</li> Right-click Iexplore.exe, and then click Modify.</li> In the Value data box, type 1, and then click OK.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

MORE INFORMATION
For more information about software update terminology, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates

<div class="moreinformation_section">

Steps to reproduce the problem
<ol>  Create an HTML page that contains the following code: Below is an inline frame <iframe src=&quot;test.htm&quot; width=&quot;90%&quot; height=&quot;90%&quot;> </li> Save the HTML page that you created in step 1 as Frame.htm.</li> Create and then save a Portable Document Format (PDF) file that is named Test.pdf.</li>  Create an HTML page that contains the following code: <a href=&quot;test.pdf&quot;>Test.pdf</a> <button onclick=&quot;Test2&quot;>Show document from script block <button onclick=&quot;alert(document)&quot;>Show document from inline script <script language=&quot;javascript&quot;> function Test2 {   alert(document); } </li> Save the HTML page that you created in step 4 as Test.htm.</li> Configure Adobe Reader so that PDF files can be opened externally. To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> Open Adobe Reader.</li> On the Edit menu, click Preferences.</li> In the Preferences dialog box, click Internet in the Categories list.</li> In the Web Browser Options area, click to clear the Display PDF in browser check box, and then click OK.</li></ol> </li> If you are prompted to restart the computer, restart the computer.</li> In Internet Explorer 7, open the Frame.htm file.</li> <li>Click the link in the inline frame. The content of the PDF file appears.</li> <li>Click Show document from script block. You receive the following warning message:

undefined

Note If you click Show document from inline script, this problem does not occur.</li></ol>

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

Keywords: kbfix kbqfe kbpubtypekc atdownload kbhotfixserver KB935579

-

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

© Microsoft Corporation. All rights reserved.