Click to See Complete Forum and Search --> : popup window from flash


stef
08-06-2003, 02:33 PM
hi there!
i am calling this function, which i have embedded in html from flash:


/////////////////

<SCRIPT LANGUAGE="JavaScript"> var javascript_version = 1.0;</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.1"> javascript_version = 1.1;</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">

var newwin;
function launchwin(winurl,winname,winfeatures)
{
if (newwin != undefined) {
newwin.close();
}
setTimeout('',250);
//This launches a new window and then
//focuses it if window.focus() is supported.
newwin = window.open(winurl,winname,winfeatures);
if(javascript_version > 1.0)
{
//delay a bit here because IE4 encounters errors
//when trying to focus a recently opened window
setTimeout('newwin.focus();',250);
}
}
</SCRIPT>

////////////////

it works just fine on the PC, but on a MAC no window appers :((
when i leave the following if-statement out (which i use to close the window before i open a new one, because i want only one window which changes its dimensions )

if (newwin != undefined) {
newwin.close();
}

a window appears, but it doesn't change the the height & width attributes which i pass in
from flash....
the code on the flash button is the following:

//////////////////

on (press) {
getURL ("javascript:launchwin('apps/panorama_pc.html', 'Z_Z','height=700, width=1014, menubar=0, scrollbars=0, status=0, toolbar=0, directories=0, fullscreen=0, sreenX=0, left=0, screenY=0, top=0');");
}

////////////////

any help on this GREATLY appreciated!!!!
best wishes
stef

Khalid Ali
08-06-2003, 04:56 PM
have you tried your code in NS6+ browsers?

If it still works then there is a problem,else I think there are errors in the code that IE just overlooks in windows and it does not over look them on MAC

stef
08-07-2003, 02:58 AM
khalid,
thanx for the reply!
just tried the following:
NS 7.02 on MAC OS 9.2 works fine
NS communicator 4.5 on MAC OS 9.2 doesn't work - first a window opens, but the height/width parameters won't do anything, the window doesn't scale, after that, no window opens at all
IE 5 on MAC OS 9.2: no window opens whatsoever...

what do you think could be wrong with the code?
best wishes
stef