[thelist] One popup window, different sizes

Robert Vreeland vreeland at studioframework.com
Wed Oct 12 21:24:49 CDT 2005

Try this (not tested)
----- In the javascript section -----
popWin = "";
Function loadWindow(newTarget, newWidth, newHeight)
	//test to see if window exists	
	if(popWin != "")
	//it does
		popWin.location = newTarget;
		popWin.resizeTo(newWidth, newHeight);
	// doesn't exist yet
		popWin = window.open(newTarget,,"height=" + newHeight + ",
width=" + newWidth + ",location=0,menubar=

------Links in opener window------
<a href="javascript: void(null)" 
<a href="javascript: void(null)" 
<a href="javascript: void(null)"

Hope it helps,
Robert Vreeland

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Robert Carpenter
Sent: Wednesday, October 12, 2005 6:53 PM
To: thelist at lists.evolt.org
Subject: [thelist] One popup window, different sizes

Hi all-

I have some flash content (3 different swf's) that I'd like to display in
popup windows. Ideally, I'd like reuse the same window as the user clicks
the various links in the main opener window, but the swf's are dramatically
different in size, so I'd like the window to fit tightly to the content as
each new swf is loaded.

Alternatively, I'd be happy to close the current popup window and reopen it
with the dimensions of the new swf, and I've worked out a script that seems
to work dandy in IE/win and Firefox, but is failing miserably in Safari with
the error "Value undefined (result of expression popWin.close) is not

I have a suspicion I'm not the first person to want to do this, does anybody
have a suggestion to improve this script, or any alternative approach?

Thanks in advance!


function popNew(a,n,h,w)    {
if((typeof(popWin) != "undefined")){
popWin = window.open(a,n,'directories=0,height=' + h + ',width=' + w +
return false;

------Links in opener window------
<a href="_swf/experience.html" target="exp"
<a href="_swf/origins.html" target="exp"
<a href="cinema.html" target="exp"


* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester and archives
of thelist go to: http://lists.evolt.org Workers of the Web, evolt ! 

More information about the thelist mailing list