BODY onLoad not fires!

Discussion in 'Javascript' started by Michal Pleban, Nov 18, 2004.

  1. Hello!

    I noticed a very strange behavior an I cannot work it around. Id
    appreciate any help on this, as it's driving me nuts...

    I have a WinXP SP1 computer with MSIE 6. It has Flash plugin version 7
    installed. I have a frameset, and one of the documents in frames has
    <BODY onLoad="..."> handler and an Flash object. To diagnose the
    problem, I put <BODY onLoad="alert('a');"> statement. And... the code is
    not run! But only when:

    * There is a Flash object on the page. If I remove the Flash movie, the
    code fires.
    * The document is opened for the first time in this window - if I click
    the link to this document once - it loads, but the code is not fired. I
    click it again, it loads again, and then the code is fired!
    * The document is in a rame. If opened alone, the code always works.
    * The document is opened in MSIE 6. In Netscape 7.2, it works OK. My
    friend who also has MSIE sees the same problem, so it's not the problem
    of my particular computer.

    The whole thing makes me feel like maybe this particular Flash movie
    somehow disables onLoad event, or maybe my JavaScript code in other
    frames disables it? But how is this possible? What can be the cause of it?

    Thanks in advance,
    Michau.
     
    Michal Pleban, Nov 18, 2004
    #1
    1. Advertisements

  2. Michal Pleban

    VK Guest

    Is it your flash movie? Can you look inside of it?

    body.onLoad fires up when all page elements reported their state to be OK,
    Error, or Abort, which means that whatever could be loaded is loaded, and
    whatever couldn't - screw it.
    If the movie inits extra server downloads (scenes, url verification, etc.)
    then onLoad may be compromised.
    And yes, ActiveScript inside the flash movie can affect too.
     
    VK, Nov 18, 2004
    #2
    1. Advertisements

  3. Unfortunately, it's not my Flash movie :( But yes, it has ActiveScript
    in it and in fact it tries to call some JavaScript function by opening
    an URL of "javascript:functionName()" form. Maybe that's the cause?

    Regards,
    Michau.
     
    Michal Pleban, Nov 19, 2004
    #3
    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.