Javascript Maximize Popup Window
Posted by tech on
June 30, 2008
I forgot where I got this from. If anyone knows who owns this code please let me know. It’s what I use to maximize a popup window. It doesn’t have the same effect as when you click on the maximize button of an application window. What it does is get the screen dimensions and uses those measurements to set the popup window’s width and height.
1 2 3 4 5 6 7 8 9 10 11 | function maximizeWindow() { window.moveTo(0, 0); if (document.all) { top.window.resizeTo(screen.availWidth,screen.availHeight); } else if (document.layers||document.getElementById) { if (top.window.outerHeight < screen.availHeight || top.window.outerWidth < screen.availWidth) { top.window.outerHeight = screen.availHeight; top.window.outerWidth = screen.availWidth; } } } |











January 1st, 2009 at 3:12 am
I think you got it from here.
http://www.dynamicdrive.com/dynamicindex8/automax.htm
January 1st, 2009 at 3:17 am
thanks for that
February 2nd, 2011 at 8:26 pm
why would you want to max a popup window. just use a link and put target=”_parrent or self
and if you put in the heaf of your main site. normal linke from your site will open in max window. just use popups for popups and the other for max windows.
you can do it with a button to.. see top of page in my site. (documents) button
opends in max window. but dont copy the code from my page. i will email them yo you if you want
February 2nd, 2011 at 8:28 pm
@kerry: i dont need your code
i know javascript. that was one of the requirements in one of my projects back then
so i dont care as long as i get paid
February 3rd, 2011 at 2:53 pm
you wanted to know how to open a popup in a maxed window if you can go ahead.
if its a button you want to use to open a maxed window that is just how i open my documents. but with a button there is allways a ‘http address’ a ‘ ‘ with the address iside it. not a “. and you cant load a maxed window with a button by using this ‘
and i have a code that can.
so much for javascript school