Hey there. I want to ask u how to make an iframe resizing when parent div is resizing. I think that I shoud use alsoResize, but i don't know if itll work with frames. Any help will be appreciated!
A:
You will have to create a javascript function in the onload of the iframe to set the .height and .width of the iframe to that of its parent as far as i'm aware for when it first loads and then on the resize event of your parent element you will have to set it again for further resizing.
Byron Cobb
2010-09-06 13:56:25
I have to resize this iframe. It has to be like the iframe in jqueryUI's dialog. If I create a function itll work only the first time. The best way will be with alseResize parametr but i dont know how to use it with iframe.
BuggyGeek
2010-09-06 13:59:55
Just set the iframes body height in the stop event of the resizable - ill post another answer below.
Byron Cobb
2010-09-06 14:35:41
A:
Why can't you just have this CSS:
iframe {
width: 100%;
height: 100%;
}
so that it will eat all space left by its container?
rFactor
2010-09-06 14:02:01
Doesn't work. Parent div is resizing but the iframe remains with the same dimensions. I also tried to set width and height parameters in the <iframe> tag which didn't work too.
BuggyGeek
2010-09-06 14:06:28
A:
$("#DIV").resizable({
start: function () {},
stop: function () {
$("A DIV or Body Tag Inside the IFRAME").height($("#DIV").height());
}
});
Byron Cobb
2010-09-06 14:37:55
I'm off for the night - post your code and i'll have a look in the morning if you still havent found an answer.
Byron Cobb
2010-09-06 15:59:35
A:
Hi Buggy, I think the same problem has been encountered by other people in stacoverflow previously. Please check out this thread : Resizing IFrame with JQuery UI
xar
2010-09-06 15:06:47