PDA

View Full Version : pop up window question


imity4
04-09-2003, 08:30 PM
I have a pop up window that is launched after a flash sniffer loads my "has flash index.html" my problem is, the window frame name is loading as the name of the swf file...

any work around?

Thanks,

imity4

here's the launch window code:

<HTML>
<HEAD>
<title>EastWest</title>

<script language="JavaScript">
function popup() {
var sWidth = screen.availWidth;
var sHeight = screen.availHeight;
xOffset = (sWidth / 2) - 380;
yOffset = (sHeight / 2) - 220;
if (xOffset < 0) xOffset = 0;
if (yOffset < 0) yOffset = 0;
var wFeatures = 'width=760,height=420,scrollbars=no,toolbar=no,scr eenX=' + xOffset + ',screenY=' + yOffset + ',top=' + yOffset + ',left=' + xOffset;
window.open('EastWest.swf','popWin',wFeatures);
}
</script>
</head>
<BODY BGCOLOR="#FFFFFF" onload="javascript:popup()">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="center" WIDTH="100%" HEIGHT="100%">
<TR>
<TD><center>
<img src="images/EWC_logo.gif" width="431" height="102" border="0" usemap="#Map2">
</center></TD>
</TR>
</TABLE>
<map name="Map">

<area shape="rect" coords="166,137,260,152" href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=English&P5_Language=English" target="_blank">
</map>
<map name="Map2">
<area shape="rect" coords="228,74,330,107" href="#" NAME="click me" onclick="javascript:popup()">
</map>
</body>
</HTML>

chicoP
04-10-2003, 01:36 AM
rename the swf file :)

imity4
04-10-2003, 06:58 PM
ah yeah, thanks but that's not what i was looking for. i've resolved this issue...

maybe i wasn't clear, i don't want the .swf extension to be in the window title. i thought this could be controlled from within the launch window, might be but i ended up calling another window with the correct name and setting the standard pop up dimensions and location from the launch.

thanks anyhow,


T




here's the code for anyone in need:

launch window:

<HTML>
<HEAD>
<title>Your Page Title</title>

<script language="JavaScript">
function popup() {
var sWidth = screen.availWidth;
var sHeight = screen.availHeight;
xOffset = (sWidth / 2) - 380;
yOffset = (sHeight / 2) - 220;
if (xOffset < 0) xOffset = 0;
if (yOffset < 0) yOffset = 0;
var wFeatures = 'width=760,height=420,scrollbars=no,toolbar=no,scr eenX=' + xOffset + ',screenY=' + yOffset + ',top=' + yOffset + ',left=' + xOffset;
window.open('yourPage.html','popWin',wFeatures);
}
</script>
</head>
<BODY BGCOLOR="#FFFFFF" onload="javascript:popup()">
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="center" WIDTH="100%" HEIGHT="100%">
<TR>
<TD><center>
<img src="images/yourLogo.gif" width="431" height="102" border="0" usemap="#Map2">
</center></TD>
</TR>
</TABLE>
<map name="Map">

<area shape="rect" coords="166,137,260,152" href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=English&P5_Language=English" target="_blank">
</map>
<map name="Map2">
<area shape="rect" coords="228,74,330,107" href="#" NAME="click me" onclick="javascript:popup()">
</map>
</body>
</HTML>

and the SWF content page:

<HTML>
<HEAD>
<title>Your Content Page Title (**********this is what i needed)</TITLE>
<script language="JavaScript">

function openNewWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}

</script>
</HEAD>
<body bgcolor=ffffff text=000000 link=ff0000 alink=0000a0 vlink=303030 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="420">
<param name="movie" value="EWCreative.swf">
<param name="quality" value="high">
<embed src="yourMovie.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="760" height="420"></embed>
</object>
</BODY>
</HTML>

you also need a page called "default.html" (i'm not totally sure why but it doesn't work without it!

<HTML>
<HEAD>
<title>Your Content Page Title</TITLE>
<script language="JavaScript">

function openNewWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}

</script>
</HEAD>
<body bgcolor=ffffff text=000000 link=ff0000 alink=0000a0 vlink=303030 leftmargin=0 marginheight=0 marginwidth=0 rightmargin=0 topmargin=0>
</BODY>
</HTML>



imity4