Scroll to top of parent page on iframe reload

Permalink Browser Info Environment
When a long page has loaded in the iframe, if you click a link at the bottom, then it loads a short page, it would be great if the parent page scrolled to the top.

Type: Discussion
Status: New
mrnoisy
View Replies:
mrnoisy replied on at Permalink Reply
mrnoisy
I figured it out - put the following on the pages in the iframe:
<body onLoad="window.parent.scroll(0,0);">
linnnnn replied on at Permalink Reply
linnnnn
Hey, I am having a similar issue! I have a google forms sheet that is long, when submit is pressed the confirmation is at the top. I found this forum and tried to use the code, but it hasn't worked. Am I doing something wrong? Here is the code (actual src form edited to keep anonymity):

<iframe src="https://docs.google.com/forms/d/1xTjBmneSEL_i4mfPjeP0S6NoP0lIOaP1sySWZ7M/viewform?embedded=true" width="600" height="2100" frameborder="0" marginheight="0" marginwidth="0"onload="window.parent.scroll(0,0)>"</iframe>

Summary: I need page to scroll to top after pressing submit so that ppl can see the confirmation, the onload thing I think I am putting in wrong!
Thanks!
SiteQwester replied on at Permalink Reply
SiteQwester
I too am interested in achieving this, but don't want to hack into my shopping cart files as the other reply offered (because my shopping cart gets upgrades often and I would have to re-apply the hacks every time). Is there another way to achieve this???
Thank you!
hugo replied on at Permalink Reply
hugo
I will see this, maybe I alter the block. Come back on friday.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.