1

Possible Duplicate:
Detect browser window Maximized/Minimized with Javascript

Is it possible to detect the maximize window of a borwserwindow in javascript.

Community
  • 1
  • 1
Pablo Jomer
  • 9,870
  • 11
  • 54
  • 102
  • 2
    http://stackoverflow.com/questions/3371973/detect-browser-window-maximized-minimized-with-javascript – Krishna Kumar Sep 25 '12 at 08:54
  • Can you show the function that the event trigger? – vusan Sep 25 '12 at 08:57
  • I was actualy wrong about the resize function not being called yet still I would like to know if you can detect the maximize button being clicked. Thanks for the responses. – Pablo Jomer Sep 25 '12 at 09:04

1 Answers1

0

if am correct check this code

<SCRIPT LANGUAGE="JavaScript">

function Minimize()
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
}

function Maximize()
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}
</SCRIPT>

<A HREF="javascript:onClick=Minimize()">Minimize</A>
<A HREF="javascript:onClick=Maximize()">Maximize</A> 

you can also give on load to give maximize on loading....

Martty Rox
  • 54
  • 4
  • 1
    the op wants to know when the maximize event is fired not fire it himself/herself – Jacob George Sep 25 '12 at 09:43
  • This is not what I wanted but thanks. – Pablo Jomer Sep 25 '12 at 11:42
  • What I wanted is an event to catch so I can call a function when maximize is called. – Pablo Jomer Sep 25 '12 at 11:43
  • 11
    Considering that the question that this is supposedly a duplicate of doesn't answer this question can we reopen this? No one has answered how, or if its even possible, to detect when the maximize button has been pressed. Why don't we try answering questions instead of being stack overflow question policy nazis. – Davidicus Oct 05 '12 at 19:22