<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Web Style Press, Best Practices from all the Web, Build Better Websites &#187; browser</title>
	<atom:link href="http://www.webstylepress.com/tag/browser/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webstylepress.com</link>
	<description>Web VS Style</description>
	<lastBuildDate>Mon, 26 Dec 2011 10:35:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Browser Control From Flash</title>
		<link>http://www.webstylepress.com/browser-control-from-flash/</link>
		<comments>http://www.webstylepress.com/browser-control-from-flash/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 09:41:20 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Adobe Flash]]></category>
		<category><![CDATA[Browser]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flash tips]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=249</guid>
		<description><![CDATA[In this section you will learn how to do the following in Flash using ActionScript. Close Browser From Flash Without POPUP Alert (browser close) With POPUP Alert (browser close) With POPUP Alert (browser close) Print From Flash Add to Favourites From Flash Launch Popup or Fullscreen Window From Flash For Full Screen in Html Page [...]<p><a href="http://www.webstylepress.com/browser-control-from-flash/">Browser Control From Flash</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p>In this section you will learn how to do the following in Flash using ActionScript.</p>
<ul>
<li>Close Browser From Flash</li>
<li>Without POPUP Alert (browser close)</li>
<li>With POPUP Alert (browser close)</li>
<li>With POPUP Alert (browser close)</li>
<li>Print From Flash</li>
<li>Add to Favourites From Flash</li>
<li>Launch Popup or Fullscreen Window From Flash</li>
<li>For Full Screen in Html Page Containing Swf</li>
<li>Open Many Popups From Flash (if u have many buttons and which indicate different windows to open)</li>
</ul>
<p>and more&#8230;</p>
<p><span id="more-249"></span></p>
<h4>Close Browser From Flash</h4>
<h5>With POPUP Alert (swf close)</h5>
<p>fscommands will do the task. Write the following script on button in flash and you are done.<br />
This script will close the swf and not the browser page.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">fscommand</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;quit&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h5>Without POPUP Alert (browser close)</h5>
<p>Write the following script on button in flash and you are done.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;javascript:window.opener=self;window.close(); &quot;</span>, <span style="color: #ff0000;">&quot;_self&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h5>With POPUP Alert (browser close)</h5>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;javascript:window.close()&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h5>With POPUP Alert (browser close)</h5>
<h6>On Flash Button</h6>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JavaScript:close();&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>In that webpage in body section write the following anywhere.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=JavaScript:close();&gt;&lt;/a&gt;</pre></div></div>

<h4>Print From Flash</h4>
<p>There is print function in flash under printing action script menu, you can use that.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">print</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_root</span>, <span style="color: #ff0000;">&quot;bmax&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>It will print the whole _root timeline. If you want to specify frames (like one frame only put a label on the frame that says #p (hash sign + p) everything else will be excluded.</p>
<p>OR</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">printAsBitmapNum</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #ff0000;">&quot;bmovie&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Printing can be customised and you can define area and other options for that i.e.</p>
<p><a rel="nofollow" target="_blank" href="http://www.flashkit.com/tutorials/Getting_Started/Customis-Eddie_Ca-31/index.php" target="_blank">Check out following instructions</a></p>
<h4>Add to Favourites From Flash</h4>
<p>Following is the example of how to add to favorites from flash movie. You will have to add some actionscript at some button in flash and also some javascript code in webpage head section inwhich that flash movie is beingcalled.</p>
<h5>On Flash Button</h5>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;javascript:AjoutFavo()&quot;</span>, <span style="color: #ff0000;">&quot;_self&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h5>In Webpage Head Section</h5>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>SCRIPT LANGUAGE<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span> 
<span style="color: #003366; font-weight: bold;">function</span> AjoutFavo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">appName</span>.<span style="color: #660066;">indexOf</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Microsoft&quot;</span><span style="color: #339933;">,</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>parseInt<span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">appVersion</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">&gt;=</span><span style="color: #CC0000;">4</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
window.<span style="color: #660066;">external</span>.<span style="color: #660066;">AddFavorite</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://www.websiteurl.com&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;web site name&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> 
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>SCRIPT<span style="color: #339933;">&gt;</span></pre></div></div>

<h4>Launch Popup or Fullscreen Window From Flash</h4>
<h4>Popup From Flash</h4>
<h5>Script For Flash Button</h5>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> 
<span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;javascript:openWin();&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h5>For Html Page that Contain Swf with Button</h5>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> openWin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'http://yahoo.com'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'win_ranking'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'width=320,height=400,toolbar=0,menubar=0,location=0,left=0,top=113,screenX=0,screenY=100,scrollbars=no'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<h5>For Full Screen in Html Page Containing Swf</h5>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #003366; font-weight: bold;">function</span> openWin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'http://yahoo.com'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'win_ranking'</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">'toolbar=0,menubar=0,location=0,left=0,top=113,screenX=0,screenY=100,scrollbars=no,fullscreen=yes'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<h6>Open Many Popups From Flash (if u have many buttons and which indicate different windows to open)</h6>
<p>Add following scripts to your flash buttons.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JavaScript: OpenWin('1.htm');&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JavaScript: OpenWin2('2.htm');&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">on</span> <span style="color: #66cc66;">&#40;</span>release<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
<span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;JavaScript: OpenWin3('3.htm');&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>and so on&#8230;</p>
<p>Add this script in the head of your page inwhich this swf is embedded.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>Script Language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;JavaScript&quot;</span><span style="color: #339933;">&gt;</span> <span style="color: #003366; font-weight: bold;">function</span> OpenWin<span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #339933;">,</span><span style="color: #3366CC;">'mNew'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;width=270,height=179,toolbar=0,menubar=0,location=0,left=0,top=113,screenX=0,screenY=100,scrollbars=no&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span>
<span style="color: #003366; font-weight: bold;">function</span> OpenWin2<span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #339933;">,</span><span style="color: #3366CC;">'mNew2'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;width=172,height=268,toolbar=0,menubar=0,location=0,left=0,top=113,screenX=0,screenY=100,scrollbars=no&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span> <span style="color: #003366; font-weight: bold;">function</span> OpenWin3<span style="color: #009900;">&#40;</span>fileName<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
window.<span style="color: #000066;">open</span><span style="color: #009900;">&#40;</span>fileName<span style="color: #339933;">,</span><span style="color: #3366CC;">'mNew3'</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;width=411,height=270,toolbar=0,menubar=0,location=0,left=0,top=113,screenX=0,screenY=100,scrollbars=no&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>	
<span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">// and so on ................................</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre></div></div>

<p><a href="http://www.webstylepress.com/browser-control-from-flash/">Browser Control From Flash</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/embed-swf-files-javascript-run-active-content/" title="Embed SWF Files Via Javascript &#8211; Active Content Script">Embed SWF Files Via Javascript &#8211; Active Content Script</a></li><li><a href="http://www.webstylepress.com/random-bubble-animation-in-flash/" title="Create Random Bubble Animation In Flash">Create Random Bubble Animation In Flash</a></li><li><a href="http://www.webstylepress.com/flash-random-text-animation/" title="Create Flash Random 3D Text Animation">Create Flash Random 3D Text Animation</a></li><li><a href="http://www.webstylepress.com/flash-resources-and-tutorials/" title="Flash Resources and Tutorials">Flash Resources and Tutorials</a></li><li><a href="http://www.webstylepress.com/scrollbars-in-flash-flash-content-scroll/" title="Scrollbars In flash &#8211; Flash Content Scroll">Scrollbars In flash &#8211; Flash Content Scroll</a></li><li><a href="http://www.webstylepress.com/flash-mouse-effects/" title="Flash Mouse Effects">Flash Mouse Effects</a></li><li><a href="http://www.webstylepress.com/google-search-from-flash/" title="Google Search From Flash Using ActionScript">Google Search From Flash Using ActionScript</a></li><li><a href="http://www.webstylepress.com/flash-hit-counter/" title="Flash Hit Counter Using ActionScript and PHP">Flash Hit Counter Using ActionScript and PHP</a></li><li><a href="http://www.webstylepress.com/swap-depth-in-flash/" title="Swap Depth In Flash">Swap Depth In Flash</a></li><li><a href="http://www.webstylepress.com/flash-slide-shows/" title="Create Flash Slide Shows Using ActionScript &#8211; Example Downloads">Create Flash Slide Shows Using ActionScript &#8211; Example Downloads</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/browser-control-from-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto Resize Browser Window To Image Size</title>
		<link>http://www.webstylepress.com/auto-resize-browser-window-to-image-size/</link>
		<comments>http://www.webstylepress.com/auto-resize-browser-window-to-image-size/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 00:32:48 +0000</pubDate>
		<dc:creator>Hiroshi</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Tricks]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[window]]></category>

		<guid isPermaLink="false">http://www.webstylepress.com/?p=100</guid>
		<description><![CDATA[This script is typically best for pop-up windows where you want to display random images on request. It will allow browser window to auto-fit according to the image size. Add this script into head section of web page: &#60;script language=&#34;javascript&#34;&#62; &#60;!-- var i=0; function resize&#40;&#41; &#123; if &#40;navigator.appName == 'Netscape'&#41; i=40; if &#40;document.images&#91;0&#93;&#41; window.resizeTo&#40;document.images&#91;0&#93;.width +30, [...]<p><a href="http://www.webstylepress.com/auto-resize-browser-window-to-image-size/">Auto Resize Browser Window To Image Size</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
]]></description>
			<content:encoded><![CDATA[<p>This script is typically best for pop-up windows where you want to display random images on request. It will allow browser window to auto-fit according to the image size.</p>
<p><span id="more-100"></span></p>
<p>Add this script into <strong>head</strong> section of web page:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script language<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;javascript&quot;</span><span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;!--</span>
<span style="color: #003366; font-weight: bold;">var</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">0</span><span style="color: #339933;">;</span>
<span style="color: #003366; font-weight: bold;">function</span> resize<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>navigator.<span style="color: #660066;">appName</span> <span style="color: #339933;">==</span> <span style="color: #3366CC;">'Netscape'</span><span style="color: #009900;">&#41;</span> i<span style="color: #339933;">=</span><span style="color: #CC0000;">40</span><span style="color: #339933;">;</span>
  <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">images</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> window.<span style="color: #660066;">resizeTo</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">images</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">width</span> <span style="color: #339933;">+</span><span style="color: #CC0000;">30</span><span style="color: #339933;">,</span> document.<span style="color: #660066;">images</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">height</span><span style="color: #339933;">+</span><span style="color: #CC0000;">80</span><span style="color: #339933;">-</span>i<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  self.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  self.<span style="color: #660066;">moveTo</span><span style="color: #009900;">&#40;</span><span style="color: #CC0000;">170</span><span style="color: #339933;">,</span><span style="color: #CC0000;">50</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">//--&gt;&lt;/script&gt;</span></pre></div></div>

<p>We just wrote a function named as <strong>resize</strong>. Call this function in the <strong>body tag</strong> of the popup page.</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;body onload=&quot;resize();&quot;&gt;</pre></div></div>

<p>This function will serve the purpose and on page load it will look for the image size and will resize the browser window according to the image size.</p>
<p>This script is for popup page at which image is placed. Call the popup page with no toolbar or menubar as decsribed below:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;#&quot; onClick=&quot;window.open('popup-page.html', '', 'toolbar=0,menubar=0,location=0,left=0,top=113,screenX=0,screenY=100,scrollbars=yes'); return false;&quot;&gt;Launch popup&lt;/a&gt;</pre></div></div>

<p><a href='http://www.webstylepress.com/wp-content/uploads/2008/09/window-resize-to-image-size.rar'>Download Window Resize Script</a></p>
<p><a href="http://www.webstylepress.com/auto-resize-browser-window-to-image-size/">Auto Resize Browser Window To Image Size</a> is a post from: <a href="http://www.webstylepress.com">Web Style Press, Best Practices from all the Web, Build Better Websites</a></p>
<h2  class="related_post_title">Related Posts</h2><ul class="related_post"><li><a href="http://www.webstylepress.com/use-any-font-in-webpages-as-text/" title="Use Any Font in Webpages As Text">Use Any Font in Webpages As Text</a></li><li><a href="http://www.webstylepress.com/simple-rollover-swap-image/" title="Simple RollOver Swap Image">Simple RollOver Swap Image</a></li><li><a href="http://www.webstylepress.com/change-image-opacity-easily-using-css-js/" title="Change Image Opacity Easily Using CSS or JS">Change Image Opacity Easily Using CSS or JS</a></li><li><a href="http://www.webstylepress.com/advanced-js-calendar/" title="Advanced JS Calendar">Advanced JS Calendar</a></li><li><a href="http://www.webstylepress.com/simple-js-calendar/" title="Create Simple Javascript Based Calendar">Create Simple Javascript Based Calendar</a></li><li><a href="http://www.webstylepress.com/javascript-essentials-part-6/" title="Javascript Essentials Part 6">Javascript Essentials Part 6</a></li><li><a href="http://www.webstylepress.com/javascript-essentials-part-5/" title="Javascript Essentials Part 5">Javascript Essentials Part 5</a></li><li><a href="http://www.webstylepress.com/javascript-essentials-part-4/" title="Javascript Essentials Part 4">Javascript Essentials Part 4</a></li><li><a href="http://www.webstylepress.com/javascript-essentials-part-3/" title="Javascript Essentials Part 3">Javascript Essentials Part 3</a></li><li><a href="http://www.webstylepress.com/javascript-essentials-part-2/" title="Javascript Essentials Part 2">Javascript Essentials Part 2</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.webstylepress.com/auto-resize-browser-window-to-image-size/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

