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
Solved

how to iconify (minimise) a window

Posted on 2002-03-07
4
821 Views
Last Modified: 2012-05-04
Hi all,

How to iconify (or minimise) a window?

I know how to close a window, window.close().

Thx

Simon
0
Comment
Question by:skcchan
  • 2
4 Comments
 
LVL 5

Expert Comment

by:nilapenn
ID: 6849574
window.blur();
0
 

Author Comment

by:skcchan
ID: 6849836
It dosen't work. The window is just lost focus.
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 6849874
lol,
you can try this:

window.resizeTo(0,0);
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 100 total points
ID: 6849884
remember to add the following if you want the window to be seen by the user when receiving focus

//to show window
window.onfocus = function() { window.resizeTo(screen.width,screen.height);

//this portion is to reduce the size
//and then make it out of focus
window.resizeTo(0,0);
window.blur();

NOTE
====
There is no programmatic way to minimize the window. That is considered the exclusive preserve of the user and not the programmer. Also, it is considered bad practice to hide windows, what code is running behind the scenes...why hide the window if you have nothing bad going on...



0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Suggested Solutions

Title # Comments Views Activity
Index on a Table 6 25
How can I make a javascript to show drop down 4 22
How can in rewrite this js anonymous function as a named function 26 31
Filktering Alphabetically 8 29
Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
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…

856 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