0

Hello,

I am trying to resize an external website in an iframe using javascript, but have not found code that works very well. Anyone know how to go about it? Thanks in Advance!

3
Contributors
5
Replies
8
Views
8 Years
Discussion Span
Last Post by agfucious
0

If the website loading in the URL has a fixed size then you would have to code something to dig through the iframe and remove the sites fixed width.

But if the sites content is bigger than the frame, there really isnt much you can do besides setting "overflow: hidden" to most of the elements in the iframe.

0

The external sites will have a fixed width, but not a fixed height. The height would range from 700 pixels-850pixels. Just looking for something that measures a height of an external site, with no use of sever code.

0

You would have to use javascript and a onload event on the iframe.

(untested)

iframeName.onload=function() {
iframeName.style.height = iframe.document.body.innerHeight;
};

Something like that might work.

This topic has been dead for over six months. 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.