The Artima Developer Community
Sponsored Link

Java Answers Forum
how to resize window to fit viewers screen resolution ??

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Anon Mouse

Posts: 1
Nickname: duce
Registered: Jun, 2003

how to resize window to fit viewers screen resolution ?? Posted: Jun 25, 2003 11:26 AM
Reply to this message Reply
Advertisement
Hi,
I'm new to this forum & JAVA programming .... ... I've been roped in to do a web site for my wife as part of her MA submissions .... hope someone can help.
I'm would like to open a window with the dimensions relative to the viewers screen size ... the code I currently use is at the end. Currently I have to have 3 definitions for everything. Is it possible to use simple maths to alter the "'width=650 height=600 left=250 top=20," functions + can I alter fonts in the same way ???.

Thanks in advance for any responses.

<!-- Begin
if (screen.height >= 768){
var adj=2;
window.open('docs/main-1024-4.htm', 'main', 'width=650 height=600 left=250 top=20, scrollbars=yes, resizable');
window.opener="top";
window.close();
}
else {
if (screen.height == 600){
window.open('docs/main-800.htm', 'main', 'width=640, height=450, left=2, top=1, scrollbars=yes, resizable,');
window.opener="top";
window.close();
}
else {
if (screen.height == 480){
window.open('docs/main-640.htm', 'main', 'width=610, height=420, left=1, top=1');
window.opener="top";
window.close();
}
}
}
// End -->

Topic: Invalid Cursor State Previous Topic   Next Topic Topic: retrieve html source code

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use