?
Solved

how to find browser is minimize or maximize or not

Posted on 2009-04-10
8
Medium Priority
?
1,625 Views
Last Modified: 2012-05-06
I want to check that my browser is minimize or maximize using javascript.If any way to do this,Please tell me.
0
Comment
Question by:scspl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 
LVL 7

Expert Comment

by:johnnash1180
ID: 24121159
You can try to check the window.outerWidth, window.outerHeight values (in Firefox) of the browser to identify the minimized state.
0
 

Author Comment

by:scspl
ID: 24121272
It is not working in all browsers,let me know if any other way
0
 
LVL 7

Expert Comment

by:johnnash1180
ID: 24121492
It cannot be done. Alternately, you can use your own functions to minimize [not exactly] the window and control your probing.

For this, the below code may be helpful.

<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()">Click Here To Minimize</A>
<A HREF="javascript:onClick=Maximize()">Click Here To Maximize</A> 

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:scspl
ID: 24121691
I have already seen it.but it is functions for Minimize/Maximize.But I want to detect both these events,whether browser is minimized or maximized
0
 
LVL 7

Expert Comment

by:johnnash1180
ID: 24121933
I afraid that you cannot detect whether the browser is minimized or not.

If you use the above function, you can track the browser minimized status, if the user used the above function to minimize the browser, you can control your probe action by introducing a new variable in the above code.

Hope it is clear.
0
 

Author Comment

by:scspl
ID: 24127926
but it is not working in IE browser
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 37169588
Question PAQ'd and stored in the solution database.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question