2fdesign
10-07-2002, 06:34 PM
It seems sometimes on Mac OS 9.2 and always on OS X that script opens to pop-up windows. Is there anyway to resolve this issue. Works perfect on win machines.
Any help would be greatly appreciated.
Jeff
2fdesign
10-07-2002, 07:20 PM
Sorry for not adding this the first time.
Here is the code in the head tag:
<script language="JavaScript" type="text/JavaScript">
<!--
function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoClos eTime,borderless) { //v2.0
var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;
if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth;
if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0;
features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
if (window["popupWindow"] == null) window["popupWindow"] = new Array();
var wp = popupWindow.length;
popupWindow[wp] = window.open(theURL,winName,features);
if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;
if (document.all || document.layers || document.getElementById) {
if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
if (alwaysOnTop && alwaysOnTop != "") {
ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
if (autoCloseTime && autoCloseTime > 0) {
popupWindow[wp].document.body.onbeforeunload = function() {
if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
window.onbeforeunload = null; }
autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }
document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}
//-->
</script>
Here is the code for the link:
<a href="javascript:Void(0);" onClick="GP_AdvOpenWindow('../Video/CS1.mov','','fullscreen=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no',3 20,256,'lefttop','ignoreLink','',0,'');return document.MM_returnValue"><img src="../images/i_r1_c1.gif" width="36" height="34" border="0"></a>
brothercake
10-08-2002, 07:11 PM
This may sound harsh - but I'll take the chance.
I don't appreciate being PMd for help; that's not PM is for. I didn't take up your post further for two reasons. Firstly, you still haven't said what the problem actually is, and I don't enjoy playing twenty questions anymore than anyone. Secondly - and this is where I could be coming across badly - this forum is for Javascript programming. Your post is not about "how do I program this with javascript" it's about "why doesn't a programatically-generated script work like I want". I think your question is better suited to Macromedia technical support.
Sorry ... :o
2fdesign
10-11-2002, 11:22 PM
Sorry for the PM, my mistake! I didn't mean to cause all this trouble. Thanks for our time. I'll be going to macromedia forum now.
Jeff:thumbsup:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.