SitePoint Sponsor

User Tag List

Results 1 to 12 of 12

Thread: Frames problem

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Frames problem

    My page has two frames. The left side is a series of llinks that open to the right frame content.

    The problem is that when once you are down near the bottom of the list of links and click on one link, the left frame automatically scrolls back up to the top causing the person to have scroll down again each time to click the next link below it. Any idea how to stop the left frame from moving like this?

    Thanks

  2. #2
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using frames in the real sense of frames with the <frame> tag, marinajc? If so, then I don't see why you are getting this problem, because frames should load indvidually, so when you click a link in the left frame, only the right frame should load, and therefore the scrollbar in the left frame should stay where it is.

    Of course, my knowledge of frames isn't great because I haven't used them in almost six years so I may be wrong.
    Regards,
    Jamie Harrop

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jamieharrop
    Are you using frames in the real sense of frames with the <frame> tag, marinajc? If so, then I don't see why you are getting this problem, because frames should load indvidually, so when you click a link in the left frame, only the right frame should load, and therefore the scrollbar in the left frame should stay where it is.

    Of course, my knowledge of frames isn't great because I haven't used them in almost six years so I may be wrong.
    Yes, this is what I am doing.

  4. #4
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you able to show us the page in question?
    Regards,
    Jamie Harrop

  5. #5
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jamieharrop
    Are you able to show us the page in question?
    I'm not sure, as it's rather tame, but still adult related. Not sure what the rules are here. But I have warned: http://www.cachetmd.com/isabella.htm

    Here is how my frameset is coded. My link is set to target "parent":

    <frameset cols="180,*" frameborder="NO" border="0" framespacing="0">

    <frame src="nav.htm" scrolling="auto" name="nav" target="nav"/>
    <frame src="IsabellaFrame.htm" name="content" target="content"/>

    </frameset>
    </frameset>
    <noframes>
    <body>

    <p> This page uses frames, but your browser doesn't support them.</p>

    </body>
    </noframes>

  6. #6
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In that case, set the target to "content".

    I would certainly advise that you not use frames though. They are outdated, and generally seen as bad practice. See http://www.htmlhelp.com/faq/html/fra...frame-problems and http://www.htmlhelp.com/faq/html/fra...l#frame-search
    Regards,
    Jamie Harrop

  7. #7
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jamieharrop
    In that case, set the target to "content".

    I would certainly advise that you not use frames though. They are outdated, and generally seen as bad practice. See http://www.htmlhelp.com/faq/html/fra...frame-problems and http://www.htmlhelp.com/faq/html/fra...l#frame-search
    I hate frames. My client is demanding it.

    I have posted the url in my response above. I did not set target to content because then the entire page loads with a new set of left frame so I now have tow left frames if I do that.

  8. #8
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hear ya. I've had that problem on occasion too.

    In that case, setting the target to "content" should work.
    Regards,
    Jamie Harrop

  9. #9
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It doesnt . It loads another left frame so I have two left frames. What am I doing wrong?

  10. #10
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Oh. Hummm. Like I say, I haven't used frames in almost six years. I'll have a play with the code now to see if I can find the problem.
    Regards,
    Jamie Harrop

  11. #11
    SitePoint Addict Jamieharrop's Avatar
    Join Date
    Mar 2005
    Location
    West Yorkshire, UK
    Posts
    211
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just did a test and it worked perfectly.

    Here is the code I used:

    index.html
    HTML Code:
    <frameset cols="180,*" frameborder="NO" border="0" framespacing="0">
    
    <frame src="nav.htm" scrolling="auto" name="nav" target="nav"/>
    <frame src="IsabellaFrame.htm" name="content" target="content"/>
    
    </frameset>
    </frameset>
    <noframes>
    <body>
    
    <p> This page uses frames, but your browser doesn't support them.</p>
    
    </body>
    </noframes>
    nav.htm
    HTML Code:
    <html>
    <head><title></title></head>
    <body>
    <a href="IsabellaFrame.htm" target="content">Test</a>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <a href="IsabellaFrame1.htm" target="content">Test</a>
    </body>
    </html>
    IsabellaFrame.htm
    HTML Code:
    <html>
    <head><title></title></head>
    <body>
    blah<p>hasfd
    </body>
    </html>
    Ignore all the line break tags. I just did it so I could create a scroll bar in the left frame. When I clicked the link to IsabellaFrame1.htm it loaded in the right frame, without loading the nav bar again (So the scroll bar stayed at the bottom) and I only had one scroll bar on the page.
    Regards,
    Jamie Harrop

  12. #12
    SitePoint Enthusiast
    Join Date
    Apr 2005
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're a doll...

    I was linking to isabella.htm instead of IsabellaFrame.htm

    Thanks, again.


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
  •