Microsoft KB Archive/811577

From BetaArchive Wiki

Article ID: 811577

Article Last Modified on 1/26/2004



APPLIES TO

  • Microsoft Internet Explorer 5.2 for Mac OS X
  • Microsoft Internet Explorer 5.1 for Macintosh




SYMPTOMS

When you follow a link in a frameset that targets the top frame, and then you go back to the page where you started, the onload event handler does not fire.

RESOLUTION

To resolve this problem, add an onunload event handler. This turns on the onload event handler so that it will fire (although how it does this is not known).

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section of this article.

MORE INFORMATION

Steps to reproduce the behavior

  1. Save frame.htm and test.htm to a Web server.

    frame.htm

    <html>
    <frameset rows="*,*">
    <frame src="test.htm">
    </frameset>
    </html>

    test.htm

    <HTML>
    <HEAD>
    <SCRIPT language='JavaScript'>
    function testMessage()
    {
        alert("onload");
    }
    </SCRIPT>
    </HEAD>
    <BODY onload="testMessage()">
    <a href="http://www.microsoft.com" target="_top">test</a><br>
    </BODY>
    </HTML>
  2. Use Microsoft Internet Explorer for Macintosh to view frame.htm. A dialog box appears that indicates that the onload event handler for the frame has fired.
  3. Click the link to view another Web page in the top frame.
  4. Click the Back button. The onload event handler does not fire.
  5. If you add the following onunload event handler, the problem does not occur.

    <BODY onload="testMessage()" onunload="">



Additional query words: MacIE

Keywords: kbbug kbhtml kbdhtml KB811577