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 4 of 4
  1. #1
    New Coder
    Join Date
    Oct 2002
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    load 2 iframe with urls from link function

    Hi,

    Trying to get my head around this, hopefully someone can help...

    List of links along the top of the page.

    <a href="javascript1();">Page 1</a> | <a href="javascript2();">page 2</a> | <a href="javascript3();">page 3</a>

    under these are 2 iframes

    When I click on 'Page 1' I want to load urls into the iframes.
    If I click 'page 2' those too would then load.

    Any one seen anything like this?

    Cheers,

    Death = $Mill

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    625
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <a href="javascript1();">Page 1</a>


    What javascript???


    <a href="http://www.yourDomain.com/yourPage.html" target="iframeName">Page 1</a>


    -james
    "God so loved the world that he gave his only begotten son, so that whosoever believed in him would not perish, but have everlasting life. For God did not send his son into the world to condemn the world, but so that through him the world might be saved. "

  • #3
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Or are you trying to load two URL's at once?.

    Code:
    <html>
    <head>
    <script>
    
    function changeFrames(url1,url2)
    {
    	window.frames[0].location.href=url1;
    	window.frames[1].location.href=url2;
    }
    </script>
    </head>
    <body>
    <a href="#" onclick='changeFrames("http://www.google.com","http://www.codingforums.com")'>Go--></a>
    <iframe></iframe>
    <iframe></iframe>
    </body>
    </html>
    Basscyst
    Helping to build a bigger box. - Adam Matthews

  • #4
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    Or:

    <a href="page1a.htm" target="nameOfTargetIFrame1" onclick="window.open('page1b.htm','nameOfTargetIFrame2')">page 1</a>
    <a href="page2a.htm" target="nameOfTargetIFrame1" onclick="window.open('page2b.htm','nameOfTargetIFrame2')">page 2</a>
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

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