I am opening up a new window and writing the HTML code for the new window. This is successful on Windows Platforms. The code write the HTML behind a FLASH file.
On the Mac platform, it does not seem to execute the EMBED/OBJECT code until you open the window for the second time (basically putting the flash object in the window again and then the user has to scroll down).
Thank you for any suggestions or solutions.
radmoose
On the Mac platform, it does not seem to execute the EMBED/OBJECT code until you open the window for the second time (basically putting the flash object in the window again and then the user has to scroll down).
Thank you for any suggestions or solutions.
radmoose
Code:
function JSCallWin {
var RtWidth = 180;
var RHeight = 180;
var RBorder = 30;
var RTitle = "Sample";
var RFName = "180.swf";
var iMyWidth;
var iMyHeight;
//gets top and left positions based on user's resolution so hint window is centered.
iMyWidth = (window.screen.width/2) - ((RWidth/2) + RBorder);
iMyHeight = (window.screen.height/2) - ((RHeight/2) + RBorder);
var RWindow = window.open("","Sample_RWindow","toolbar=no,menubar=no,location=no,status=no,height=" + (RHeight+RBorder) + ",width=" + (RWidth+RBorder) + ",resizable=no,left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",scrollbars=no");
RWindow.document.write('<HTML>');
RWindow.document.write('<HEAD>');
RWindow.document.write('<TITLE>' + RTitle + '</TITLE>');
RWindow.document.write('</HEAD>');
RWindow.document.write('<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000000" VLINK="#000000">');
RWindow.document.write('<font face="Verdana, Arial">');
RWindow.document.write('<CENTER>');
RWindow.document.write('<TABLE width="' + RWidth + '" height="' + RHeight + '" align="center" border="0" cellpadding="0" cellspacing="0">');
RWindow.document.write('<TR>');
RWindow.document.write('<TD align="center">');
RWindow.document.write('<OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="' + RWidth + '" HEIGHT="' + RHeight + '" CODEBASE="[URL unfurl="true"]http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0">');[/URL]
RWindow.document.write('<PARAM NAME="MOVIE" VALUE="' + RFName + '">');
RWindow.document.write('<PARAM NAME="PLAY" VALUE="true">');
RWindow.document.write('<PARAM NAME="LOOP" VALUE="true">');
RWindow.document.write('<PARAM NAME="QUALITY" VALUE="high">');
RWindow.document.write('<PARAM NAME="SCALE" VALUE="showall">');
RWindow.document.write('<PARAM NAME="MENU" VALUE="false">');
RWindow.document.write('<EMBED SRC="' + RFName + '" WIDTH="' + RWidth + '" HEIGHT="' + RHeight + '" PLAY="true" LOOP="true" QUALITY="high" SCALE="showall" MENU="false" PLUGINSPAGE="[URL unfurl="true"]http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');[/URL]
RWindow.document.write('</EMBED>');
RWindow.document.write('</OBJECT>');
RWindow.document.write('</TD>');
RWindow.document.write('</TR>');
RWindow.document.write('<TR>');
RWindow.document.write('<TD align="center">');
RWindow.document.write('<A HREF="javascript:window.close()" style="font-size: 10">Close Window</A>
RWindow.document.write('</TD>');
RWindow.document.write('</TR>');
RWindow.document.write('</TABLE>');
RWindow.document.write('</CENTER>');
RWindow.document.write('</FONT>');
RWindow.document.write('</BODY>');
RWindow.document.write('</HTML>');
RWindow.focus();
}