Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Force browser to close after a delay?

Reply
Thread Tools

Force browser to close after a delay?

 
 
Martin
Guest
Posts: n/a
 
      03-07-2006
Using javascript, I want to force a browser window to close after
about 30 minutes of non-use. Can someone point me to a script that can
do this?

I assume I could use the setTimeout function and keep re-setting it
whenever the mouse is moved.

Is there a better way?
 
Reply With Quote
 
 
 
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      03-07-2006
Martin wrote:

> Using javascript, I want to force a browser window to close after
> about 30 minutes of non-use. Can someone point me to a script that
> can do this?


Write it yourself.

> I assume I could use the setTimeout function and keep re-setting it
> whenever the mouse is moved.


Your assumption is correct.

> Is there a better way?


No.


PointedEars
 
Reply With Quote
 
 
 
 
Jonas Raoni
Guest
Posts: n/a
 
      03-07-2006
Thomas 'PointedEars' Lahn wrote:
> Martin wrote:
>>Using javascript, I want to force a browser window to close after
>>about 30 minutes of non-use. Can someone point me to a script that
>>can do this?

>
> Write it yourself.


\o/

(function(){
var timer;
(document.onmousemove = document.onkeydown = function(){
clearTimeout(timer), timer = setTimeout("window.close();", 1800000);
})();
})();


--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      03-08-2006
On Tue, 07 Mar 2006 17:44:42 -0300, Jonas Raoni <(E-Mail Removed)>
wrote:

>Thomas 'PointedEars' Lahn wrote:
>> Martin wrote:
>>>Using javascript, I want to force a browser window to close after
>>>about 30 minutes of non-use. Can someone point me to a script that
>>>can do this?

>>
>> Write it yourself.

>
>\o/
>
>(function(){
> var timer;
> (document.onmousemove = document.onkeydown = function(){
> clearTimeout(timer), timer = setTimeout("window.close();", 1800000);
> })();
>})();


Thank you, Jonas. It's good to see that some people, like you, are
here to actually help others.
 
Reply With Quote
 
Jonas Raoni
Guest
Posts: n/a
 
      03-08-2006
Martin wrote:
> On Tue, 07 Mar 2006 17:44:42 -0300, Jonas Raoni <(E-Mail Removed)>
> wrote:
> Thank you, Jonas. It's good to see that some people, like you, are
> here to actually help others.


Hmmm, not at all, I'm here just to spend some free time, discuss and
expose my opinion about unuseful things, but I really try to help
sometimes, anyway thanks :]

I want to discuss with Mr. Spock again, maybe I can beat my off-topic
record of 100 msgs, but he is thousands stronger than me ='/


--
Now with alcohol <URL:http://youtube.com/watch?v=lnQTZxqxc10> =X
Jonas Raoni Soares Silva
http://www.jsfromhell.com

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      03-08-2006
Jonas Raoni said the following on 3/7/2006 9:49 PM:
> Martin wrote:
>> On Tue, 07 Mar 2006 17:44:42 -0300, Jonas Raoni <(E-Mail Removed)>
>> wrote:
>> Thank you, Jonas. It's good to see that some people, like you, are
>> here to actually help others.

>
> Hmmm, not at all, I'm here just to spend some free time, discuss and
> expose my opinion about unuseful things, but I really try to help
> sometimes, anyway thanks :]
>
> I want to discuss with Mr. Spock again, maybe I can beat my off-topic
> record of 100 msgs, but he is thousands stronger than me ='/


LOL, we can do that if you want

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
 
Reply With Quote
 
Jonas Raoni
Guest
Posts: n/a
 
      03-08-2006
Randy Webb wrote:
> Jonas Raoni said the following on 3/7/2006 9:49 PM:
>> I want to discuss with Mr. Spock again, maybe I can beat my off-topic
>> record of 100 msgs, but he is thousands stronger than me ='/

>
> LOL, we can do that if you want


Not today, my aunt just died of a heart attack, I'll spend the rest of
my free time with my mom now =(


--
Now with alcohol <URL:http://youtube.com/watch?v=lnQTZxqxc10> =X
Jonas Raoni Soares Silva
http://www.jsfromhell.com

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike air force one, air force 1, air force one low cut, air force one abdul_razak@indiatimes.com Digital Photography 2 12-31-2008 04:29 PM
Nike Air Force Ones,Air Force One Air Force One-1 lky52193@gmail.com Computer Support 0 01-17-2008 04:40 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:46 PM
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52112@gmail.com Digital Photography 0 01-15-2008 04:34 PM
Browser close event (MSIE and FF): how to detect browser close ? pamelafluente@libero.it Javascript 0 01-23-2007 12:44 AM



Advertisments