onunload not firing?

Discussion in 'Javascript' started by Kourosh, Jun 7, 2006.

  1. Kourosh

    Kourosh Guest

    I'm using IE6 and I've just created a simple page with this event:
    <body onunload="alert('sad')">


    could someone tell me if this works for you if you have IE 6? I've
    tested this in firefox and IE 7 and they both work fine with it. but on
    the IE6 copy I'm testing, the event is fired only when the page is
    refreshed. It's not fired when I close the page.


    any ideas or suggestions?
    thanks in advance
     
    Kourosh, Jun 7, 2006
    #1
    1. Advertisements

  2. Kourosh

    TC Guest

    On my IE6, this works fine:

    <html>
    <body onunload="alert('sad')">
    </body>
    </html>

    If I add an MOTW to suppress the security warnng, it still works fine:

    <!-- saved from url=(0014)about:internet -->
    <html>
    <body onunload="alert('sad')">
    </body>
    </html>

    Maybe you have disabled scripting in the browser somehow?

    HTH,
    TC (MVP MSAccess)
    http://tc2.atspace.com
     
    TC, Jun 8, 2006
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.