Solved

how to find browser is minimize or maximize or not

Posted on 2009-04-10
8
1,482 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
  • 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
rhino JavaScript import, load 25 66
Google script to get long/lat from address 10 63
JS Plugin Chaining 2 32
link rel have Width and height 2 0
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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…

947 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now