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; } } } |
I think you got it from here.
http://www.dynamicdrive.com/dynamicindex8/automax.htm
thanks for that
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
@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 😀
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
Only works on FMSIE. I tested it on FF, Chrome, Opera and Safari and nothing.