0

<iframe width="608" frameborder="0" id="mainframe" name="mainframe" onload="$(this).height($(this).contents().height());" src="mindex/forratt.php" scrolling="no" /></iframe>

So I have written this code to automatically adjust the iframe to its content and it works fine.

The thing is that when I access a page with a lower height, the height from the previous page stays put. I want it to automatically adjust to the height of the new page.

How do I make that happen? Give me some pointers please! <3

2
Contributors
2
Replies
4
Views
4 Years
Discussion Span
Last Post by Vingklippt
0

are you calling the new page from within the iframe ?

If no, make it a click function to run the $(this).height($(this).contents().height()); maybe? Instead of the onload to call it everytime to event is called to the iframe?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.