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
    Feb 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    change content of multiple frames?

    help!? yes, i am very new... i cant figure out why this isnt working. i am trying to get 4 different html pages to load into different frames. with the code below, only the content_frame pages loads. the three staff pages stay the same.

    <html>
    <head>
    <script language = "JavaScript">
    <!-- hide
    function changeFrames(content_frame, staff_one, staff_two, staff_three)
    {
    parent.content.location = content_frame;
    parent.billy.location = staff_one;
    parent.joel.location = staff_two;
    parent.matt.location = staff_three;
    }
    // show -->
    </script>
    </head>
    <body>
    <font face="verdana, arial, helvetica, sans-serif" size=1 color="#333333">
    <a href = "#" onClick = "changeFrames('a.room.html','billyNAV.html','joel.html','matt.html'); return false;">A ROOM</a><br>
    <a href = "#" onClick = "changeFrames('b.room.html','billy.html','joelNAV.html','matt.html'); return false;">B ROOM</a><br>
    <a href = "#" onClick = "changeFrames('c.room.html','billy.html','joel.html','mattNAV.html'); return false;">C ROOM</a><br>
    </font>
    </body>
    </html>

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    Kansas City, Kansas
    Posts
    1,518
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Well this page doesn't contain any frames, it must be in a frame itself. Can I see the code for the main page, the one containing the actualy frames?

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,074
    Thanks
    0
    Thanked 256 Times in 252 Posts
    You should post the frameset page for us to see the structure of your frames.

    But using window.open will work whatever frame structure you have.

    function changeFrames(content_frame, staff_one, staff_two, staff_three)
    {
    window.open(content_frame,"content");
    window.open(staff_one,"billy");
    window.open(staff_two,"joel");
    window.open(staff_three,"matt");
    }
    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
    •