code question - frameset & nav button list dropdown

Discussion in 'Community Forum Software' started by 3Phase, May 28, 2009.

  1. 3Phase

    3Phase Champion

    Joined:
    Mar 14, 2009
    Messages:
    342
    Likes Received:
    44
    I am sure the answer to this is pitifully easy, but I didn't manage to find it in w3.com or my 1+lb html book.

    http://www.barntalk.modelhorseblab.com/zmbt/main.htm

    This page is composed of 2 frames, the navigation and the content, side by side. The dropdown list from the navigation buttons should display over the right side frame, but it is staying within its own frame and therefore not displaying properly or nicely. I'm guessing there is one short & simple piece of html or javascript missing.

    Any tips most appreciated! Thanks! :)

    main.htm frameset code:
    (dunno why a space is appearing in the middle of "visible" below, it is not typed that way so I don't think that's actually the error)
    -------------
    <html>
    <head>
    <title></title>
    <!--nav background <body bgcolor="#FFFFCC"> -->
    <script type="text/javascript">
    function displayOverflow()
    {
    document.getElementById("nav").style.overflow="visible";
    }
    </script>
    </head>
    <!--overflow:visible overflow="visible" -->
    <frameset cols="15%,85%" border="0" frameborder="0">
    <frame name="nav" id="nav" src="btnnavv.htm" marginwidth="" marginheight="" scrolling="no">
    <frame name="WhatIs" src="WhatIs.htm" marginwidth="" marginheight="" scrolling="yes">
    </frameset>
    </html>

    ------------
    I've tried both of the below, but not happening
    document.getElementById("nav")
    document.getElementById("WhatIs")
     
  2. 3Phase

    3Phase Champion

    Joined:
    Mar 14, 2009
    Messages:
    342
    Likes Received:
    44
    A bump in case anyone has an idea they want to share.
    (Won't bump again. :) )
     
  3. Wayne Luke

    Wayne Luke Regular Member

    Joined:
    Apr 2, 2009
    Messages:
    991
    Likes Received:
    276
    Its difficult to do this because each frame (and iframe) is considered its own window and usually documents cannot draw outside their windows. I know there used to be tutorials for doing this on the internet in the early part of this decade but since frames are rarely used anymore they are downed out by the CSS stuff and I haven't been able to find any that actually work to do what you want to do.

    Using overflow the way you are should generate horizontal scrollbars when the content shows but should not show it in another window. Frames simply don't work that way.

    Might try using a suckerfish or jquery based drop-down menu instead of frames. Would be more elegant in today's web. You can find a lot of menu code that you can use here: Dynamic Drive CSS Library- Practical CSS codes and examples
     
  4. 3Phase

    3Phase Champion

    Joined:
    Mar 14, 2009
    Messages:
    342
    Likes Received:
    44
    Thank you Wayne! Will follow that lead! :)
     
  5. Rocket 442

    Rocket 442 Ambitious, but Rubbish

    Joined:
    May 31, 2009
    Messages:
    174
    Likes Received:
    30
    Location:
    Buffalo, NY
    First Name:
    Andy
    Yeah, iFrames are not really good to use now.

    you can even use a purely css dropdown if you don't want to use jquery. If you still have problems with things overlapping the dropdown with just css, all you've gotta change is the z-index.
     

Share This Page