Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

A hyperlink in a frameset may open a new window to display the linked content in Internet Explorer 6


View products that this article applies to.

Symptoms

In Microsoft Internet Explorer 6, a hyperlink that is displayed in a frameset may open a new window to display the linked content instead of displaying the linked content in the specified frame. This problem occurs more frequently when the following conditions are true:
  • You view a .pdf file in the browser.
  • You use the Back button in the browser together with a sequence of links.

↑ Back to the top


Resolution

Instead of using the Target attribute of the hyperlink, you can handle the onClick event and use the following Location.href code example. The Location.href code example replaces the Menu.htm code example that is mentioned in the "More Information" section.
<html>
<body>
<a href="link1.htm" onclick="parent.frames('data1').location.href=this.href;return  false;" >link1-htm  </a>
<a href="link2.htm" onclick="parent.frames('data1').location.href=this.href;return  false;">link2-htm  </a>
<a href="YourPDF.pdf" onclick="parent.frames('data1').location.href=this.href;return  false;">link4-PDF   </a>
</body>
</html>

↑ Back to the top


More information

Steps to reproduce the problem

  1. Create a .pdf file that is named YourPDF. To do this, create a copy of any .pdf file that you have, and then rename the copy YourPDF.pdf.
  2. Create the following HTML (.htm) files. To do this, paste the code sample in a text editor such as Notepad, and then save the file by using the listed file name.
    • Repro.htm
      <html>
      <head>
      <title>testing</title>
      </head>
      <frameset rows="62,*" frameborder="NO" border="0">
         <frame src="menu.htm" name="menu" scrolling="yes" frameborder="yes">
         
         <frame src="bottom.htm" name="data1">
         
      </frameset>
      </html>
    • Menu.htm
      <html>
      <body>
      <a href="link1.htm" target="data1" >link1-htm  </a>
      <a href="link2.htm" target="data1">link2-htm  </a>
      <a href="YourPDF.pdf" target="data1">link3-PDF  </a>
      </body>
      </html>
    • Link1.htm
      <html>
      <body>
      link1
      </body>
      </html>
    • Link2.htm
      <html>
      <body>
      link2
      </body>
      </html>
    • Bottom.htm
      <html>
      <body>
      Bottom
      </body>
      </html>
      
  3. In Internet Explorer, locate and then open the Repro.htm file.
  4. Click the links in the following order:
    1. Click link1.
    2. Click link2.
    3. Click link3-pdf.
    4. Click link1.
    5. Click link2.
    6. Click link3-pdf.
  5. Click the Back button in Internet Explorer.
  6. Click link 1. A new window appears that contains the link 1 page.
If you continue to click the links in the Repro.htm file, the linked content always appears in this new window.

↑ Back to the top


Properties

Retired KB Content Disclaimer
This 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.

↑ Back to the top


Keywords: KB890078, kbprb, kbtshoot

↑ Back to the top

Article Info
Article ID : 890078
Revision : 2
Created on : 5/18/2005
Published on : 5/18/2005
Exists online : False
Views : 413