Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Mar 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Frames and returning to the top?

    Hi,

    I have a problem.

    I have a page that i have intergrated into one of my sites. This page is intergrated using an iframe so it looks like its part of the site. The trouble i'm having is:

    I have some pictures on the iframe page that when they are clicked they take you to a bigger pic and some more info. The trouble is when i keep scrolling down the main page(the one that isn't in the iframe) and i click on a pic near the bottom of the page it loads the bigger pic and info but the main page doesn't scroll back to the top so it looks like nothing has loaded!

    Is there a piece of script that when i click the picture link in the iframe page it will load the pic but also make the main page(the one that isn't in the iframe) return to the top?

    Thanks

    Joe

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    You could try adding

    window.scrollTo(0,0)

    to the onclick event
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New Coder
    Join Date
    Mar 2006
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, Thanks for the reply. I added Parent. to it and i worked great! Thanks Very much

    Joe


  •  

    Posting Permissions

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