Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Load into a Iframe then onLoad into a Iframe?

    hello need a hand loading a page into a differant iframe using onLoad:

    I have two Iframes on a page and some links, the first iframe is called 'Main' the other called 'arrow', what i am trying to do is when i click a link which loads up content in the main iframe once that page is loaded it loads up content into the other iframe i.e.'arrow'

    ive been tying it with this:

    <script language="JavaScript">
    <!--
    function MM_goToURL() { //v3.0
    var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
    for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    }
    //-->
    </script>

    onLoad="MM_goToURL('parent','file: blank.htm');return document.MM_returnValue">

    OR - could is it possiable to load two seperate pages into two seperate iFrames using one link ?!?

    but of coase this just loads it into the current iframe.
    Yes its macromedia, (god help me).
    Last edited by SpamyDan; 07-03-2002 at 05:50 PM.

  • #2
    New to the CF scene
    Join Date
    Jul 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cool

    Managed to work out how two do two frames at once - incase anybody needs to know:

    <script>
    function Click(){
    document.Main.location.href = "http://www.codingforums.com"
    document.Arrow.location.href = "http://www.yahoo.com"
    }
    </script>

    <a href="javascript:Click()">Click Here</a>

    Just need to work out onLoad now!

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    FL, USA
    Posts
    734
    Thanks
    0
    Thanked 0 Times in 0 Posts
    heres what you can do.

    In the actual link on the page, put this

    <script language="javascript">

    function link(){

    parent.Main.location.href="whatver.html"

    }
    </script>


    -------

    Now in the page - whatver.html - put an onload function like this

    <script language="javascript">

    function link2(){

    parent.arrow.location.href="whatver2.html"

    }
    </script>

    <body onload="link2()">

    -------

    This should work hehe (Never does though)
    CYWebmaster.com - See why we dot com!!
    ACJavascripts.com - Cut & Paste Javascripts!
    SimplyProgram.com - Personal Blog


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •