iframe gotop on changing page

Posted on 2012-08-28
Last Modified: 2013-03-05

I'm running an application in frame. When I'm clicking on any link to change page, the page changes but instead to go to top of the page, I'm going to the section that the parent page was. For example: if the link that I clicked was on the bottom of the page, the new page loads in the bottom posiotion. If the link was in the middle of the page, the new page opens in the middle.
I tried many solutions that I found on the net, using body onload etc, or even placing an <a href="top"> in the parent page, but nothing works.

Thank you
Question by:ChrisTERiS
    LVL 107

    Expert Comment

    by:Ray Paseur
    I think we need to see this in action.  Please post the URL of the site that demonstrates this phenomenon, thanks.

    Author Comment

    Here is the link. This issue in one part of my problem. I've opened a seperate issue in case that you want to check it. Try to refresh the page. You'll see that you'll redirect to the main page.

    LVL 107

    Expert Comment

    by:Ray Paseur
    I think I see it.  On the front page (linked above) I scroll down some and then click "Religion Discussion."  The resulting page shows a similar scroll location.  I think this is something happening on the browser side of things.  Facebook does some strange things to the DOM; this might just be one of them.

    Do you find this behavior in all browsers?

    Author Comment

    Unfortunatelly yes, with all browsers. But I think that this is a common behavior of iframe, not specific to Facebook. Just the 2-3 solutions that I tried didn't worked. Please note that I tried it outside Facebook (using iframes), I faced the same problem. So definetelly is not a Facebook issue.
    LVL 107

    Accepted Solution

    OK, thanks for the update.  I have to go teach a class tonight, and I'll be away for a couple of days after that.  Suggest you delete this question and post a new question.  When you post the new question, include all the information we discussed here - the URL and the way to get a demonstration of the issue.

    The reason I am suggesting that you delete the question is that it really is not answered and I won't be able to research it in a timely manner.  Many of the Experts will not engage in a question when there is already a long comment thread, so your chances of getting a good answer will be stronger with a new question.

    All the best,

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Article by: DanRollins
    This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (, we'll extend the program by adding a depth-…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now