JasonDoucette
Programmer
Hello, I have seen many solutions for maximizing a window with the following code:
I have tested this with IE 6.0 and Mozilla Firefox 1.0. If this is put to use on a multiple monitor system, on a monitor with negative screen coordinates (i.e. it is to the left of the primary monitor), it will not work. The moveTo() does not move the window to the upper-left corner. In IE's case, when the window has negative coordinates, resizeTo() does not resize the window to the specified size. resizeTo() works fine in Firefox.
I should note that this code works fine on the primary monitor, and on any secondary monitor with positive screen coordinates.
Any thoughts or suggestions are appreciated.
Jason Doucette
Code:
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
I have tested this with IE 6.0 and Mozilla Firefox 1.0. If this is put to use on a multiple monitor system, on a monitor with negative screen coordinates (i.e. it is to the left of the primary monitor), it will not work. The moveTo() does not move the window to the upper-left corner. In IE's case, when the window has negative coordinates, resizeTo() does not resize the window to the specified size. resizeTo() works fine in Firefox.
I should note that this code works fine on the primary monitor, and on any secondary monitor with positive screen coordinates.
Any thoughts or suggestions are appreciated.
Jason Doucette