frames help plz

Discussion in 'PHP' started by Th3Boss, May 8, 2008.

  1. #1
    ok basicly what im trying to do is get the header of my site on top, then the framed affiliate link and then once some1 scrolls to the bottom of that framed page id like the footer to be displayed, currently it shows the header and footer all the time, i dont want the footer to show unless some1 scrolls to the bottom.

    also right now when some1 clicks a link on the header frame, it just loads that link in the header, how can i get it so that if they click that link it will take them to that site instead of that site just being in the header frame?


    hope that makes sense, anyways heres what i got so far

    <FRAMESET rows="15%, 65%, 17%" border="0">
    <title>title</title>
    <frame src="headertop.php" name="mainFrame" scrolling="no" noresize>
    <frame src="framedpage.com" name="midFrame" scrolling="verticle" noresize>
    <frame src="footerbottom.php" name="footerFrame" scrolling="no" noresize>
    </frameset>
    
    <noframes>
    <body>
    <p>This page uses frames, but your browser doesn't support them. <a href="framedpage.com">Click here to visit the link without frames</a></p>
    </body>
    </noframes>
    PHP:
     
    If someone posts a solution, use the "Best Answer" link in their post to pick it as the best answer.
    Th3Boss, May 8, 2008 IP
  2. bokiatenxi

    bokiatenxi Peon

    Messages:
    27
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    first of all, why are you using frames???

    I dont know if its possible to redirect the whole page when someone clicks on a link inside a frame, bear in mind that frames work separately from each other, imagine that having 3 frames in a page is like having 3 browsers integrated in one page, they are together but they all work independently. I suggest using includes in your pages instead of frames.

    but if you really want to stick to frames, which again I do not suggest, you can make the link from the header to redirect and appear on the middle frame by using the target attribute of a <a> tag

    <a href='newpage.html' target='midFrame'> Header Link </a>

    for your other question, about showing the footer after someone scrolls down, I dont think thats possible, what you can do is add the footer on the same frame as the middle frame.