Results 1 to 3 of 3

Thread: Iframe help - refresh after load?

  1. #1
    Join Date
    Jun 2007
    Location
    North Plains Oregon
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Iframe help - refresh after load?

    I have an iframe in my index page that loads other pages via tabs; on those pages are links to other pages & web sites that also load into the iframe. The problem I have is that some of the links are low on their respective page and when the new page loads you can't see the top of the new page without scrolling up.

    Example: <a href="http://www.newpage.com/" >New Page</a></b></li>

    What can I do to get the page to refresh or scroll to the top after the page loads?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    In your iframe, include in the body tag:
    <body ... onLoad="javascript:window.scrollTo(0,0);">
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2007
    Location
    North Plains Oregon
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, but I think my post wasn't exactly correct; the iframe loads the new page and scrolls to the top, but the index page doesn't scroll up and so the top of the iframe and hence the new page is not visible without scrolling the index page up. Make any sense?

    Your help is greatly appreciated.

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
  •