wickford
07-03-2003, 10:51 PM
Can you help please? I have a script that, when a user clicks a link, a popup window appears and positions itself in the center of the screen.
function popup(url){
var height=400, width=300;
var popit=window.open(url,'details','height='+height+',width='+width);
popit.moveTo((screen.width/2)-(width/2),(screen.height/2)-(height/2));
}
Here is the HTML link:
<a href="javascript: popup('http://www.google.com');"
The script works fine in Netscape and Opera, but in Internet Explorer (6.0 at least) I get an error saying that access is denied. Is this a fault with the browser or with the script?
Thanks.
function popup(url){
var height=400, width=300;
var popit=window.open(url,'details','height='+height+',width='+width);
popit.moveTo((screen.width/2)-(width/2),(screen.height/2)-(height/2));
}
Here is the HTML link:
<a href="javascript: popup('http://www.google.com');"
The script works fine in Netscape and Opera, but in Internet Explorer (6.0 at least) I get an error saying that access is denied. Is this a fault with the browser or with the script?
Thanks.