views:

11

answers:

1

Hi, How to find the window state using javascript.Consider our application need to alert('restor') when browser unmaximize and also need to alert('maximized') when restore or maximize the browser.Can anybody please help me.

+1  A: 

There isn't a way to specifically detect maximize/restore events. The closest you can get is the onresize event which tells you that the window has been resized. You could use this in conjunction with screen.width and screen.height to possibly guess if the window is maximized.

casablanca