Welcome visitor
* Login
* Register
It is currently January 24th, 2019, 10:45 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » JavaScript



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  help to close a window with countdown
PostPosted: March 10th, 2009, 2:22 am 

Posts: 57
Hi, i know that there are some threads about closing a window with javascript, but my particular issue is that i want to close it after 30 sec and to show the seconds countdown. Can you help me please?


Top
 Profile  
 
  Re: help to close a window with countdown
PostPosted: March 10th, 2009, 2:26 am 
User avatar

Posts: 61
on this example 'countdown' is where you show the countdown.
var sec=30;
var time;
function timedCount(){
    document.getElementById('countdown').value=sec;
    sec = sec - 1;
    time=setTimeout("timedCount()",1000);
    if (sec==0){
        window.close();
    }
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » JavaScript


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron