473,976 Members | 25,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript Countdown

mageswar005
72 New Member
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 2547
acoder
16,027 Recognized Expert Moderator MVP
Post what you've tried so far.
Aug 12 '08 #2
RamananKalirajan
608 Contributor
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.getEle mentById('myDiv ').innerHTML=x;
setTimeout('doT his()',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
mageswar005
72 New Member
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.getEle mentById('myDiv ').innerHTML=x;
setTimeout('doT his()',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 Recognized Expert Moderator MVP
As I said in the first reply, post your code.
Aug 18 '08 #5
RamananKalirajan
608 Contributor
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
6793
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? What I have is a page heavy on the javascript that has a number of functions, one of which is to begin a visual countdown with an onclick and also open an asp page containing the server-side vbscript, which initiates a wake-on-lan call. I had no...
4
4424
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 takes an extra 35 seconds, but has taken an extra 2.5 minutes in some cases. Any ideas what might be the cause? And more importantly - the fix? Code snippet below... Thanks, Christine
2
5077
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 this particular FULL code into a MySQL field. Here's the drill: I have a timer on a PHP webpage, and i want to prevent the user from doing a
8
3803
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 help me find a way to stop it at zero? Thank you, Mike
4
3541
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 help.
4
2247
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 down to 10:00am 15th August for example? Thanks...Andre
5
3631
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 Drive. I'd try to build something myself, but I just need something quick and easy. The instructions say to put all the code on the same page; the functions in the <head> and then some code to call the countdown in the <body>. In order to keep my main...
18
1984
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 ECMAScript as has already been achieved between PHP versions 4 and 5, then they have my blessings. Specifically, the availability of a Standard ECMAScript Library
0
2383
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 making some sort of game and I got stuck… :P I managed to get a clock counting down from 30 to 0 and then collect the score but I get in trouble when i try to make a button that restarts the procedure since i then get the doubled clock speed counting...
0
10171
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11818
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11571
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10908
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7604
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6415
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6557
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5153
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.