mrtz
08-25-2004, 04:53 PM
hi. i have the following code in my flash mx file:
getURL("javascript:OpenWindow('http://www.url.com/file.htm','', '949', '659','-1','-1','false','false','')");
and the following javascript function (OpenWindow) in the html file:
<script language="javascript">
function OpenWindow(strURL, strName, intWidth, intHeight, intTop, intLeft, IsScrollbar, IsResizeAble, WindowTitle)
{
intTop = -1;
intLeft = -1;
if (intTop ==- 1)
{
//Get values for centering the window
var x = screen.availWidth;
var y = screen.availHeight;
if(x > intWidth)
{
intLeft = (x-intWidth)/2;
}
if(y > intHeight)
{
intTop = (y-intHeight)/2-30;
}
}
var AddOption;
var strOptions;
var strResizeString = "";
if (IsResizeAble == true)
{
strResizeString = "yes";
}
else
{
strResizeString = "no";
}
if(IsScrollbar == true) {
strOptions = "scrollbars,toolbar=no,location=no,directories=no,s tatus=no,menubar=no,resizable=" + strResizeString + ",copyhistory=no,height=" + intHeight + ",width=" + intWidth + ",left=" + intLeft + ",top=" + intTop;
}
else {
strOptions = "toolbar=no,location=no,directories=no,status=no,me nubar=no,resizable=" + strResizeString + ",copyhistory=no,height=" + intHeight + ",width=" + intWidth + ",left=" + intLeft + ",top=" + intTop;
}
//alert(strOptions);
mywin = window.open(strURL,strName,strOptions);
/*
if (WindowTitle != "")
{
if (WindowTitle.length > 0)
{
mywin.document.title = WindowTitle;
}
}
*/
mywin.focus();
}
</script>
then i wrote:
<param name="allowScriptAccess" value="always" />
<param name="swliveaccess" value="YES" />
same in the embed src tag)
the problem is: it works with ie. safari on mac but it does not work with explorer on pc: no pop up window opens.
what could be the problem?
getURL("javascript:OpenWindow('http://www.url.com/file.htm','', '949', '659','-1','-1','false','false','')");
and the following javascript function (OpenWindow) in the html file:
<script language="javascript">
function OpenWindow(strURL, strName, intWidth, intHeight, intTop, intLeft, IsScrollbar, IsResizeAble, WindowTitle)
{
intTop = -1;
intLeft = -1;
if (intTop ==- 1)
{
//Get values for centering the window
var x = screen.availWidth;
var y = screen.availHeight;
if(x > intWidth)
{
intLeft = (x-intWidth)/2;
}
if(y > intHeight)
{
intTop = (y-intHeight)/2-30;
}
}
var AddOption;
var strOptions;
var strResizeString = "";
if (IsResizeAble == true)
{
strResizeString = "yes";
}
else
{
strResizeString = "no";
}
if(IsScrollbar == true) {
strOptions = "scrollbars,toolbar=no,location=no,directories=no,s tatus=no,menubar=no,resizable=" + strResizeString + ",copyhistory=no,height=" + intHeight + ",width=" + intWidth + ",left=" + intLeft + ",top=" + intTop;
}
else {
strOptions = "toolbar=no,location=no,directories=no,status=no,me nubar=no,resizable=" + strResizeString + ",copyhistory=no,height=" + intHeight + ",width=" + intWidth + ",left=" + intLeft + ",top=" + intTop;
}
//alert(strOptions);
mywin = window.open(strURL,strName,strOptions);
/*
if (WindowTitle != "")
{
if (WindowTitle.length > 0)
{
mywin.document.title = WindowTitle;
}
}
*/
mywin.focus();
}
</script>
then i wrote:
<param name="allowScriptAccess" value="always" />
<param name="swliveaccess" value="YES" />
same in the embed src tag)
the problem is: it works with ie. safari on mac but it does not work with explorer on pc: no pop up window opens.
what could be the problem?