Not working on the mac?

hi all…

Just updating a website for someone andhe wanted a pop window which there is a tutorial on.

heres the tutorial

URL=http://www.kirupa.com/developer/mx/centered_popup.asp]pop up tut

and the site I’m updating
danduchars

when in the site click still life and its down the bottom the button VIEW CLIENT LIST

alls fine…apart from when you view it on a mac…whys that?

On the pc it works great…on the mac the window appears but the movie doesnt?

heres the code for the button:
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = “http://www.kirupa.com/modular/pop-up.htm”;
target_winName = “kirupa”;
width = 400;
height = 300;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}[

and the code which sits in the actions layer:
Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL (“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(’” + url + “’,’” + winName + “’,’” + “width=” + w + “,height=” + h + “,toolbar=” + toolbar + “,location=” + location + “,directories=” + directories + “,status=” + status + “,menubar=” + menubar + “,scrollbars=” + scrollbars + “,resizable=” + resizable + “,top=’+((screen.height/2)-(” + h/2 + “))+’,left=’+((screen.width/2)-(” + w/2 + “))+’” + “’)}else{myWin.focus();};void(0);”);
}

cheers…

postatomic



getURL ("java script:var myWin; if(!myWin || myWin.closed){myWin = window.open('" + url + "','" + winName + "','" + "width=" + w + ",height=" + h + ",toolbar=" + toolbar + ",location=" + location + ",directories=" + directories + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",top='+((screen.height/2)-(" + h/2 + "))+',left='+((screen.width/2)-(" + w/2 + "))+'" + "')}else{myWin.focus();};void(0);");
}



First, there’s a character limit to getURL statements. This may not work on other browsers as well (older browsers).

Second, why in the world are you coding the javascript function in Flash? Put it in the HTML and pass the variable URL as a text string into the function:

ie… getURL(“javascript: popWindow(” + theURL + “)”);

Third, you’ve got a space in your javascript declaration:

“java script” should be “javascript”

This could also cause conflict with browsers that render strict code.

thanks for replying…

I followed the tutorial on how to create a pop up window ti told me to place it in flash so thats why the javascript was there…

thanks for the reply though