C
cschang
I include this javascript file in my jsp page developed in Weblogic
8.1.4 on Windows 2000 platform. Basically, I use the makeRemote( )
function in an <a..> hyperlink to open a child window, which has the
size of window of its parent, and then overlap at the left-top corner of
the parent window. However, the function moveTo() was not working and
system displayed an error of "access denied" of that line despite the
child window was open. I have used this same javascript section in an
ASP format and it never complained. Anyone know why? Thanks.
/*
Subject: provides the common used javascript functions
*/
function makeRemote(xstrUrl)
{
var aHeight = document.body.offsetHeight*0.95;
var aWidth = document.body.offsetWidth*0.99;
var sl = window.screenLeft;
var st = window.screenTop;
var features = "width=" + aWidth + ",height=" + aHeight +
",resizable=yes,scrollbars=yes";
var remote = window.open(xstrUrl,"remotewin",features)
// remote =
window.open(xstrUrl,"remotewin","location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=1,width=640,height=480,top=20,left=20");
if (remote.opener == null) remote.opener = window;
remote.opener.name = "opener";
remote.moveTo(sl,st);
remote.focus();
}
C Chang
8.1.4 on Windows 2000 platform. Basically, I use the makeRemote( )
function in an <a..> hyperlink to open a child window, which has the
size of window of its parent, and then overlap at the left-top corner of
the parent window. However, the function moveTo() was not working and
system displayed an error of "access denied" of that line despite the
child window was open. I have used this same javascript section in an
ASP format and it never complained. Anyone know why? Thanks.
/*
Subject: provides the common used javascript functions
*/
function makeRemote(xstrUrl)
{
var aHeight = document.body.offsetHeight*0.95;
var aWidth = document.body.offsetWidth*0.99;
var sl = window.screenLeft;
var st = window.screenTop;
var features = "width=" + aWidth + ",height=" + aHeight +
",resizable=yes,scrollbars=yes";
var remote = window.open(xstrUrl,"remotewin",features)
// remote =
window.open(xstrUrl,"remotewin","location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=1,width=640,height=480,top=20,left=20");
if (remote.opener == null) remote.opener = window;
remote.opener.name = "opener";
remote.moveTo(sl,st);
remote.focus();
}
C Chang