Return to Snippet

Revision: 43049
at March 15, 2011 21:58 by kodomonster


Updated Code
//set the document domain
document.domain = 'xxxx.com';

//resize the iframe
function parent_resize()
{
parent.resize_iframe("idofiframe", document.getElementById('wrapper').offsetHeight);
}

<body onload="parent_resize();">
<div id="wrapper">
.....
</div>

Revision: 43048
at March 15, 2011 21:57 by kodomonster


Updated Code
document.domain = 'xxxx.com';
function parent_resize()
{
parent.resize_iframe("idofiframe", document.getElementById('wrapper').offsetHeight);
}

<body onload="parent_resize();">
<div id="wrapper">
.....
</div>

Revision: 43047
at March 15, 2011 21:51 by kodomonster


Initial Code
document.domain = 'xxxx.com';
function parent_resize()
{
parent.resize_iframe("idofiframe", document.getElementById('wrapper').offsetHeight);
}

<body onload="parent_resize();">

Initial URL

                                

Initial Description
Resize iframe height.  This means if the content of your iframe is longer than the iframe height, and the iframe doesn't have a scrollbar, you can resize the height of the iframe so the content is viewed.

Initial Title
Resize Iframe Height with Javascript

Initial Tags
resize

Initial Language
JavaScript