-1

Hi i cannot for the life of me find a solution to this.. i have searched on ehre and tried every suggested solution for this issue...

nothing seems to work with a facebook/iframe combination

as this guy said Unfortunately, it doesn't work, as well as many other solutions I tried: onload="window.parent.scroll(0,0);", document.getElementById("someTopDivId").scrollIntoView();, $(window/html/body).scrollTop(0);... Nothing seems to work with the Facebook iframe combination :( – BBog Dec 8 '11 at 9:40

from here Scrolling to the top of a new opened page inside an iframe

problem is this when user gets to bottom of page 1 (inside iframe) on facebook tab, and click "next page" it then loads the page 2 into the iframe but in the same place eg at the bottom and not the top forcing user to scroll back up to the top to conuntinue reading page 2

there are MANY simialr questions but cant seem to find a solution anyone know how to beat this issue?

would have thought its a pretty big one as iframe is being used by many in this way on FB surely someone has fifgured this out?

appreciate any assistance!

Community
  • 1
  • 1
Kym Gilham
  • 123
  • 2
  • 8

1 Answers1

1

just use FB JS SDK's FB.Canvas.ScrollTo.

see http://developers.facebook.com/docs/reference/javascript/FB.Canvas.scrollTo/ for more info.

Rufinus
  • 29,200
  • 6
  • 68
  • 84
  • thanks for chiming in im usng one of the free iframe tab editors, to embed a URL so im not sure i have access to use that? sorry im a bit of a programming newb! – Kym Gilham Nov 23 '12 at 14:34
  • the FB.Canvas.scrollTo(0,0); would only work if you created your own facebook app not one of those free iframe tab editors. – gerl Mar 13 '13 at 14:39
  • depends on the implementation, as long as your page is directly embeded into facebooks iframe it will work. (header redirect for example, have such a app for easy fangating too) - and then all FB.JS methods works... (...when they are working :D) – Rufinus Mar 13 '13 at 14:41