order of iframe loading with document loading

Discussion in 'Javascript' started by ofir, Dec 3, 2007.

  1. ofir

    ofir Guest

    I have a page with iframe that i can only reach to it's attached .js
    file.
    i'm trying to change the src of the iframe but the only this i found
    is:
    document.attachEvent("onreadystatechange",startup)
    function startup()
    {
    try{
    var iframes = document.getElementsByTagName("IFRAME");
    iframes(0).src = "http://www.blablabla.com";
    catch(e){}
    }

    it worked but only after it allready loads the content of the iframe
    so it first loads the original src and then my new one.
    can I attach to an event that run before the original src loads into
    the iframe?

    thanks,
    ofir, Dec 3, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soren Kuula
    Replies:
    2
    Views:
    481
    Soren Kuula
    Feb 1, 2004
  2. Ion Freeman
    Replies:
    17
    Views:
    812
    Tom Anderson
    Jul 11, 2009
  3. Replies:
    0
    Views:
    486
  4. Daedalous
    Replies:
    3
    Views:
    660
    Daedalous
    Jan 16, 2004
  5. Mel
    Replies:
    1
    Views:
    232
    Martin Honnen
    Jun 8, 2005
Loading...

Share This Page