Results 1 to 8 of 8

Thread: CSS menu that changes two frames.

  1. #1
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS menu that changes two frames.

    I need a menu that changes two frames at once. The left frame will be navigation for the frame on the right. I looked in dynamic for a couple of hours but didn't find one that would work. Any help would be appreciated, JF

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You're not giving us much to go on here. Sounds like you want a link that will load one page into one frame and another page into another frame. Menus are basically just organized and styled bunches of links so, the menu wouldn't matter so much as would the link though, to do this, different menus would probably need to be adapted in different ways. One way to target two different frames with one link is like so:

    Code:
    <a href="page1.htm" target="frameone" onclick="top.frames.frametwo.href='page2.htm';return true;">Link text</a>
    Where frameone and frametwo are the names of the frames on the top page.

    Then again, I may have completely missed your point.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Code:
    onclick="top.frames.frametwo.href='page2.htm';return true;">Link text</a>
    with the "top.frames.frametwo.href='page2.htm';return true;" is top.frames.frametwo.href supposed to go in just as it is and change the page that it is referencing?

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    frametwo is the name of the frame, if your frame has a different name, use it instead. The page can be whatever you like.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    does this script work if it is in <li> tags?

  6. #6
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    <li><a href="about.htm" title="About School" target="main" onclick="top.frames.side.href='aboutside2.htm';return true;"><span>About School </span></a></li>

    This is what I have. When you click on the link of the top frame it changes the main frame but not the side navigation frame. Is it a problem with this or a problem with the index?

    <!-- Top navigation-->
    <frameset rows="100, *">
    <frame src="frame.htm" scrolling="no" noresize>
    <!-- Side Navigation-->
    <frameset cols="150, *">
    <frame src="aboutside.htm" name="side" scrolling="no">
    <!-- Main Page-->
    <frameset cols="*, 0">
    <frame src="home.htm" name="main">

    This is the index. Something I am doing wrong? Thanks for any help, JF

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Sorry, it needs to be location.href:

    Code:
    onclick="top.frames.side.location.href='aboutside2.htm';return true;"
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Aug 2005
    Posts
    200
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I love you, Truly. Now I can build the navigation for my site. Thanks alot jscheuer1

Bookmarks

Posting Permissions

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