Solved

Maximize window size

Posted on 1997-04-21
2
673 Views
Last Modified: 2009-12-16
basic question

when opening a new window using window.open,
how do you ensure the window is open to its largest capable
size?  This meaning the window must fill the user's screen, therefore a 640X480 user will have his window sized to 640x480 and a 1024x768 user will have his window sized to 1024x768.  I guess the real question is that this window needs to be maximized as if the user clicked on the maximize button on the title bar.

This only pertains to Netscape Navigator 3.0 and above.  I don't want to use VBScript as I already know  how to do that and I have made sure my script detects if a user is using MSIE3.0+
0
Comment
Question by:etchen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
RM032397 earned 100 total points
ID: 1265263
Omit the dimensions, for a full screen window : ASSUMING that the current window is fullscreen. If not, the new window will be the same size as the current window. BNooks may tell you that javascript defaults to full screen size when height and width are not specified - but I find that that is not true.

You could hardcode the pixel sizes for the main screen specs. then give the user a choice with , say radio buttons, to select the appropriate size. Or you could suggest to the user that they make the window full screen.

0
 

Author Comment

by:etchen
ID: 1265264
I have tried that, but the problem occurs when  the user's window is smaller than screen size.  Somehow, in Netscape, when you open a new window, the screen size can be no larger than the one calling it.  I was wondering how I could make the window larger automatically.  If there is no way, then I will except your answer.  But just incase anyone else is reading this, I offer a better solution to getting the screen resolution.  Below is an email I got from lhs@sarto.com who told me:

John Mark Mitchell published a solution based on Java a couple of weeks
ago :
if (navigator.javaEnabled())
           {
           var toolkit = java.awt.Toolkit.getDefaultToolkit();
               var screen_size = toolkit.getScreenSize();
           wz = screen_size.width;
           hz = screen_size.height;
                   }

This should give you the resolution of the monitor!  It employs
Javascript to extract from the Default toolkit in NN Java the values of
the Sreen Width (screen_size.width) and (screen_size.height).    


I've tested this and it works perfectly.              
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question