We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,031 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Detect if browser window is maximized or not

Hello

Now that I know how to get the width/height, how can I detect if the browser is maximized or not?

Crossbrowser of course.

Thanks

2
Contributors
1
Reply
2 Hours
Discussion Span
3 Months Ago
Last Updated
3
Views
riahc3
 
Team Colleague
1,300 posts since May 2008
Reputation Points: 62
Solved Threads: 13
Skill Endorsements: 11

You can check if the screen width/height is the same of the window width/height.

Actually you have to use screen.availHeight to get the screen height without the taskbar.

Something like this(not tested):

if ( screen.height == window.height ) { // FullScreen Mode

}
else if ( screen.availHeight == window.height ) { // Maximized

}
else { // Other size

}
AleMonteiro
Master Poster
752 posts since Aug 2010
Reputation Points: 129
Solved Threads: 140
Skill Endorsements: 23

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0606 seconds using 2.65MB