|
-
Aug 16th, 2001, 12:37 PM
#1
Thread Starter
Lively Member
resizeTo 2/3
I want to position the popup in the center of the screen and 2/3 the size of the screen?
Ive tried this:
w=Math.round(screen.availheight*2/3);
h=Math.round(screen.availwidth*2/3);
t=(screen.availheight/2)-(h/2+5)
l=(screen.availwidth/2)-(w/2+25)
resizeTo(w,h)
moveTo(t,l)
but it came out about half the width of the screen and almost full hieght. It also was positioned in the lower left with the bottom 1/3 off the screen.
Thank you
-
Aug 16th, 2001, 01:50 PM
#2
try this
Code:
<script>
function resize() {
window.resizeTo(window.screen.width * 2/3 ,window.screen.height * 2/3 );
}
</script>
-
Aug 16th, 2001, 03:13 PM
#3
Thread Starter
Lively Member
Thank you,
That got the size but I came up with this to get the positioning in case anyone wants to know:
h=(window.screen.availHeight * 2/3);
w=(window.screen.availWidth * 2/3);
t = (screen.width) ? (screen.width-w)/2 : 0;
l = (screen.height) ? (screen.height-h)/2 : 0;
resizeTo(w,h)
moveTo(t,l)
Thanks
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
|