PDA

View Full Version : AS/Javascript



afroman
04-01-2007, 12:19 PM
Hi , i am using javascript in flash to open a pop up window when a button is press in flash. The code seem to work with no problem in firefox, but it always come back with this error in Explorer. "Internet Explorer cannot download. unspecify error" Does any body know why this is happening and how i can fix this. the i used is below.

thankz in advance.

on (release) {

getURL ("javascript:NewWindow=window.open('download/1024.html','newWin','width=1024,height=768,left=0,top=0, toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=Yes'); NewWindow.focus(); void(0);");

}

BLiZZaRD
04-13-2007, 03:30 PM
Don't use Flash to call the parameters of the POP up, use the browser for that.

In the head part of your html file add this:

<SCRIPT type="text/javascript" language="JavaScript">
<!--
function newwin(location,name,w,h)
{
var scrw=(screen.width/2)-(w/2);
var scrh=(screen.height/2)-(h/2);
window.open(location,name,'scrollbars,left='+scrw+',top='+scrh+',width='+w+',height='+h);
}
//-->
</SCRIPT>

and call it with a button in flash using:

GetUrl
javascript:newwin('popupfile.htm','hos',300,400)