<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/javascript/tags/resize</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sat, 11 Oct 2008 04:23:40 GMT</pubDate>
<item>
<title>(JavaScript) iframe resize to match frame source using javascript and div innerhtml - jamesming</title>
<link>http://snipplr.com/view/8084/iframe-resize-to-match-frame-source-using-javascript-and-div-innerhtml/</link>
<description><![CDATA[ <p>Post a stripped down version of the page if you can. One that shows exactly how the iframe fits into the structure of the page.

The solution I settled on works like this:
The parent page has a javascript function like this:

function insertIt() {
var _y = document.getElementById('framediv');
var _x = window.frames[0].document.body.innerHTML;
_y.innerHTML = _x
}
Then, the parent page has a div with the id "framediv" which is placed where the contents of the iframe should appear on the page.
The iframe element is then placed inside the div, like this:





As you can see, there's onload="insertIt()" inside the iframe element. So when the iframe loads, the parent page immediately takes the contents of the body of the document contained in the iframe and actually replaces the iframe element with that content.

It's a little tricky to comprehend, but it works great.

You said you're a newbie, does this make any sense to you?

also, is the iframe document located on the same server and the same domain as the parent page?
That will play a part.</p> ]]></description>
<pubDate>Fri, 29 Aug 2008 10:07:57 GMT</pubDate>
<guid>http://snipplr.com/view/8084/iframe-resize-to-match-frame-source-using-javascript-and-div-innerhtml/</guid>
</item>
<item>
<title>(JavaScript) Resizing a DIV - fernandaparisi</title>
<link>http://snipplr.com/view/5492/resizing-a-div/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 19 Mar 2008 14:41:52 GMT</pubDate>
<guid>http://snipplr.com/view/5492/resizing-a-div/</guid>
</item>
<item>
<title>(JavaScript) 320xMAX - Feb30th1712</title>
<link>http://snipplr.com/view/5203/320xmax/</link>
<description><![CDATA[ <p>A bookmark-let that resizes the width of the view-port to 320 and the height of the window to the height of the screen excluding the task-bar. Then move the window to the left top corner.</p> ]]></description>
<pubDate>Tue, 26 Feb 2008 06:15:30 GMT</pubDate>
<guid>http://snipplr.com/view/5203/320xmax/</guid>
</item>
<item>
<title>(JavaScript) 640x480 - Feb30th1712</title>
<link>http://snipplr.com/view/4553/640x480/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Mon, 14 Jan 2008 05:48:09 GMT</pubDate>
<guid>http://snipplr.com/view/4553/640x480/</guid>
</item>
<item>
<title>(JavaScript) OPTxMAX - Feb30th1712</title>
<link>http://snipplr.com/view/4519/optxmax/</link>
<description><![CDATA[ <p>A bookmark-let to resize the width of the view-port to optimization and the height of the window to the height of the screen excluding the task-bar. Then move the window to the left top corner.</p> ]]></description>
<pubDate>Sun, 13 Jan 2008 10:16:38 GMT</pubDate>
<guid>http://snipplr.com/view/4519/optxmax/</guid>
</item>
<item>
<title>(JavaScript) 640xMAX - Feb30th1712</title>
<link>http://snipplr.com/view/4518/640xmax/</link>
<description><![CDATA[ <p>A bookmark-let that resizes the width of the view-port to 640 and the height of the window to the height of the screen excluding the task-bar. Then move the window to the left top corner.</p> ]]></description>
<pubDate>Sun, 13 Jan 2008 10:07:25 GMT</pubDate>
<guid>http://snipplr.com/view/4518/640xmax/</guid>
</item>
<item>
<title>(JavaScript) 800xMAX - Feb30th1712</title>
<link>http://snipplr.com/view/4517/800xmax/</link>
<description><![CDATA[ <p>A bookmark-let that resizes the width of the view-port to 800 and the height of the window to the height of the screen excluding the task-bar. Then move the window to the left top corner.</p> ]]></description>
<pubDate>Sun, 13 Jan 2008 10:06:34 GMT</pubDate>
<guid>http://snipplr.com/view/4517/800xmax/</guid>
</item>
<item>
<title>(JavaScript) 1024xMAX - Feb30th1712</title>
<link>http://snipplr.com/view/4516/1024xmax/</link>
<description><![CDATA[ <p>A bookmark-let that resizes the width of the view-port to 1024 and the height of the window to the height of the screen excluding the task-bar. Then move the window to the left top corner.</p> ]]></description>
<pubDate>Sun, 13 Jan 2008 10:04:49 GMT</pubDate>
<guid>http://snipplr.com/view/4516/1024xmax/</guid>
</item>
<item>
<title>(JavaScript) Mootools Draggable / Resize Example - 1man</title>
<link>http://snipplr.com/view/4038/mootools-draggable--resize-example/</link>
<description><![CDATA[ <p>Very simple drag and resize function.</p> ]]></description>
<pubDate>Mon, 29 Oct 2007 08:29:23 GMT</pubDate>
<guid>http://snipplr.com/view/4038/mootools-draggable--resize-example/</guid>
</item>
<item>
<title>(JavaScript) Resize window - pckujawa</title>
<link>http://snipplr.com/view/767/resize-window/</link>
<description><![CDATA[ <p>Put in the head of the html page. Set the dimensions in the parentheses.  The first number is the width; the second is the height.</p> ]]></description>
<pubDate>Thu, 10 Aug 2006 13:23:54 GMT</pubDate>
<guid>http://snipplr.com/view/767/resize-window/</guid>
</item>
</channel>
</rss>