question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scroll top using iframeResizer

See original GitHub issue

Hello, I currently have an iframe, and I use your javascript:

Example:

<iframe id = "myIframe" src = "https://www.compras.icambio.es/compradivisas.aspx" scrolling = "no"> </ iframe>

On the page that is the URL of the src, I have included the javascript iframeResizer.contentWindow.js

The problem is the following, when I am browsing:

I have a form on the first page, when I sent it the scroll stays in half because the second screen is higher than the first and I want it to go back to the top of the second page.

I have tried to use a jquery to return top of the page when loading:

window.parent. $ ("body"). animate ({scrollTop: 0}, 'slow');

But it’s not working.

I would like that when you load the second page into the iframe, return to position 0 of the top of that page.

I do not know if you can help me, regards.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

0reactions
quarantaquatrocommented, Oct 9, 2021

Hi guys, can someone help me out here. I read this documentation but I still don’t get it to scroll to the top if the user clicked a link inside the iframe. I do not have access to the content inside the iframe. I try to scroll to the top always when the user clicks something. I would be happy if somebody can help me with this code. thx

Read more comments on GitHub >

github_iconTop Results From Across the Web

iframe-resizer: How to scroll to the top - Stack Overflow
Yes, iframe-Resizer solves this problem. But I still have to learn how to use the scrollTo-Method: github.com/davidjbradshaw/iframe-resizer.
Read more >
iFrame Resizer - GitHub Pages
Provides custom sizing and scrolling methods. Exposes parent position and viewport size to the iFrame. Works with ViewerJS to support PDF and ODF...
Read more >
Adding Pages to SpaceCraft - FitMetrix - MINDBODY
Click the Content tab. In the Global Content section, click the Footer link. Click the User-added image (HTML) button. Add the iFrameResizer and ......
Read more >
iFrame resizer details - apaleo Developer Documentation
It resizes in accordance with the height of your application. In other words, the library allows apaleo to handle the scrollbars for you....
Read more >
Iframe Resizer - JavaScripting.com
Keep same and cross domain iFrames sized to their content with support for window/content resizing, nesting and multiple iFrames. (Dependency free,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found