Minimize/Maximize a Browser Window
Building the Right Environment to Support AI, Machine Learning and Deep Learning
[Here's What's Happening]
I mainly use the effect when I open smaller windows, in order to allow the user to see one piece of code while reading over text in the larger, parent window. Often I'll have two extra windows apart from the parent, and these commands will allow the user to minimize and maximize the windows.
Mind you, I only offer the code on pages that will display on Navigator 4.0 and above. I get that effect by using an internal browser test script.
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
Here's What's Happening
You'll notice that I have actually set up two functions, one that maximizes and one that minimizes. If you understand one, then you'll certainly be able to pick apart the other. Let's look at the first one.
There are other methods of getting the same resize effect, but the first time I saw this done, the author used the innerWidth and innerHeight commands, so I kept it that way. Those two commands deal with the inner browser window measurements in pixels. Notice I have the window set to measure 100 by 100 pixels.
The next two lines set a point so that the alwaysLowered command will be able to lower and move the window to the bottom right of the screen. The minimize sets the X and Y to the full screen size and the Maximize sets it to the zero points so the maximized screen goes all the way up to the left-hand corner.
Click on a link and one function or the other is triggered. Your screen will minimize or maximize. Since the script is set up to read and work with whatever screen setting you or your users have set up, just copy, paste, and you're good to go.
This isn't an effect you'll want to use a great deal. I use it only sparingly myself, but I have used it.
When you do incorporate it into a page, be sure you put the links that create the effect in the upper left-hand corner. That way they will be visible even when the screen minimizes and jumps down to the lower right-hand corner.
[Here's What's Happening]
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...