Context:
- PARENT PAGE loads an IFRAME that contains an app/plugin
- PARENT PAGE has different domain than the IFRAME
- PARENT PAGE and IFRAME both have installed the
iframeResizerplugin -> the iframe has no scroll bar (all content is shown on parent page) - IFRAME is always resized based on its document height - PARENT PAGE html/js cannot be changed, only the IFRAME
Problem:
If the user is at the bottom of the IFRAME, and performs an action, how do you scroll him at the TOP OF THE IFRAME?
Solutions that DO NOT work:
-
window.scrollTo(0,0); // from iframe -
anything with
window.parentfrom iframe (cannot access) -
use an anchor at top of iframe body and rewrite
window.location
Solutions that do work?
- will post one as an answer (it works, but it's weird...and not good for IE)



