Link to home
Start Free TrialLog in
Avatar of globalwm
globalwm

asked on

Auto-minimize window after x-amount of time of no activity?

Is there a way that after a page is rendered (in IE) that the web page is auto-minimized after a period of time? Is there something that can be done using the <body> tag's onLoad, onBlur or onFocus events?
Avatar of Badotz
Badotz
Flag of United States of America image

No, but a timer could do it:

var timer=window.setTimeout("sizer()", HOURS * MINUTES * SECONDS * 1000);

function sizer()
{
  window.clearTimer(timer);
  window.resizeTo(100,100);
}

kind of thing?
Avatar of globalwm
globalwm

ASKER

Could work - can you put into a sample proof-of-concept webpage to see?
<html>
<head>
<title>POC - Timer</title>
<script type="text/javascript">
var timer = -1;
function countDown()
{
window.setTimeout("sizer", 10 * 1000); // Fires after 10 seconds
}
function sizer()
{
window.clearTimeout(timer);
window.resizeTo(200,100);
}
window.onload = countDown;
</script>
</head>
<body>
<p>Window will resize in 10 seconds</p>
</body>
</html>
<$.02>I *love* doing homework</$.02>
Didn't do anything...  (?)
heh~  this is not homework.
ASKER CERTIFIED SOLUTION
Avatar of Badotz
Badotz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No worries - glad to help.