-
Maximized popup in the Middle, doen't work!
Hi!
im using this script:
<script type="text/javascript">
<!--
function popup(URL,width,height){
if (parseInt(navigator.appVersion) >= 3){
if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)<5){
var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
screen=tools.getScreenSize();
}
x = screen.width; y = screen.height;
}
window.open(URL,"sidan","top=" + parseInt(y/2-height/2-16-20) + ",left=" + parseInt(x/2-width/2-5) + ",x" + width + ",y" + height);
}
-->
</script>
to open a popup window wich is supposed to calculate the screen size and positon itself i the middle, i also wnat it to maximize and use the hole available screensize.
It works some times but not always, there's espessialy problems on widescreens (16:9) monitors like thoose on new notebooks!
can annyone help me?
om not that good at javascrip!
-
/*
<script type="text/javascript">
<!--
function popup(URL,width,height){
if (parseInt(navigator.appVersion) >= 3){
if (navigator.appName == "Netscape" && parseInt(navigator.appVersion)<5){
var tools = new Packages.java.awt.Toolkit.getDefaultToolkit();
screen=tools.getScreenSize();
}
x = screen.width; y = screen.height;
}
window.open(URL,"sidan","top=" + parseInt(y/2-height/2-16-20) + ",left=" + parseInt(x/2-width/2-5) + ",x" + width + ",y" + height);
}
-->
</script>
*/
-
-
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|