473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Javascript Countdown

mageswar005
hi,
I need a javascript countdown timer to my website, I have already the countdown timer but its have some problem.

Note: 1) If i choose the tools/internet option in my browser means , at that time countdown cannot be stop.

2) If i refresh the page means the countdown should comes from begining time.

this is for Browser session time out countdown timer.

Regards,
M.Mageswaran
Aug 12 '08 #1
5 2520
acoder
16,027 Expert Mod 8TB
Post what you've tried so far.
Aug 12 '08 #2
RamananKalirajan
608 512MB
Hi Mageshwaran, this is a code which satisfies one fo ur requirement (2). But I can't satisfy ur requirement 1.

[HTML]<html>
<head>
<script type="text/javascript">
var x=0;
function doThis()
{
x=x+1;
document.getElementById('myDiv').innerHTML=x;
setTimeout('doThis()',1000);
}
</script>
</head>
<body onload="doThis()">
<h2>CountDown</h2>
<h3><Div id="myDiv"></Div></h3>
</body>
</html>[/HTML]
Regards
Ramanan Kalirajan
Aug 12 '08 #3
Hi Mageshwaran, this is a code which satisfies one fo ur requirement (2). But I can't satisfy ur requirement 1.

[HTML]<html>
<head>
<script type="text/javascript">
var x=0;
function doThis()
{
x=x+1;
document.getElementById('myDiv').innerHTML=x;
setTimeout('doThis()',1000);
}
</script>
</head>
<body onload="doThis()">
<h2>CountDown</h2>
<h3><Div id="myDiv"></Div></h3>
</body>
</html>[/HTML]
Regards
Ramanan Kalirajan
still i didnt got result
Aug 18 '08 #4
acoder
16,027 Expert Mod 8TB
As I said in the first reply, post your code.
Aug 18 '08 #5
RamananKalirajan
608 512MB
still i didnt got result
The code what I had given to u is working fine for ur requirement no 2. i.e. If i refresh the page the count down starts from the begining. Please post ur code what u have tried so far. What is the IE version u are using.

Regards
Ramanan Kalirajan
Aug 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: David Shorthouse | last post by:
Hey folks, Not an off-topic posting.....since I was shot-down in an earlier post...this one's legit. How do I go about calling a server-side vbscript within a client-side javascript function?...
4
by: Christine | last post by:
I've implemented a countdown timer for a tutorial web page that should give the user 45 minutes to complete the test, only to find that the timer is slowly 'losing' time. On average, it actually...
2
by: RootShell | last post by:
Hello First of all i know that PHP is a server side, and JavaScript is a Client side programming language, but i need to know if there is any way i can add the variable "countDownInterval" from...
8
by: Michael | last post by:
I have this script that works the way I want except for one thing... Once it hits zero it starts to count up and looks like this: -1:0-1:0-1:0-18 with the last number counting up. Can anyone...
4
by: henrik | last post by:
Hi. Can anyone tell me the python code for a simple countdown from eg. 2.00 minutes. It should be printet out to the screen. When it is finished it should write "Time is up" Hope you can...
4
by: Dirntknow | last post by:
I've found this link to a countdown timer i'd like to use but although I can get it to view correctly in my website i'm not sure what to edit for a different date. What do i change for it to count...
5
by: nickarnold | last post by:
Hi, this is my first time posting a question, so I apologize if I goof up or do not provide enough information. I am trying to implement a simple countdown script that I grabbed from Dynamic...
18
by: www.gerardvignes.com | last post by:
Upcoming Changes to the JavaScript Language (presented by Google) http://youtube.com/watch?v=-yDS1eGfuWQ I really enjoyed this presentation. If they can get the same improvement in...
0
by: Jorhajnes | last post by:
Hi there. Im very new to making games in flash, although I have used flash for quite some time now in web-based situations so I know my way around. Anyways, I thought it would be fun to try...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.