473,398 Members | 2,212 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,398 software developers and data experts.

How to stop this timer?

1
Hi,
I want to stop the timeout of a site with this source (attached)
Plaese help me.



It may have two counter i want to stop the second one or all of them.

thanx for your helps.
Attached Files
File Type: zip prephp 01.zip (12.1 KB, 182 views)
Jun 15 '10 #1
1 3297
gits
5,390 Expert Mod 4TB
you might use the clearTimeout(ref) or clearInterval(ref) methods to stop timed execution of javascript - have a look here for examples and the usage of the methods. basically you assign the timeout to a variable like this:

Expand|Select|Wrap|Line Numbers
  1. var func = function() {
  2.     alert('foo');
  3. };
  4.  
  5. var to = window.setTimeout(func, 1000);
  6.  
  7. // this instantly will stop the timeout ->
  8. // so func is not executed
  9. window.clearTimeout(to);
kind regards
Jul 18 '10 #2

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

Similar topics

2
by: andrewcw | last post by:
I am trying to do a windows service with C#. I am using as a base the VB.NET article in VS, but I thing the WITHEVENTS timer notation is a delegate. Can anyone provide sample code & anh hints. ...
3
by: jam | last post by:
Dear all, I am wrtiing a console application and doing some test on timer, the below is my sample code I got from some site, but I cannot make it work... Error is 'System.Timers.Timer' does not...
8
by: Jim Hammond | last post by:
The following code tries to excute a function 10 seconds after Page_Load by using a Timer, but the callback never gets called. private void Page_Load(object sender, System.EventArgs e) { ...
3
by: Jim Hammond | last post by:
The code below works except that calling Server.Transfer generates the following exception, and I don't know why yet: "Error executing child request for Form_Welcome.aspx." Although a page has...
2
by: John David Thornton | last post by:
I've got a Windows Service class, and I put a System.Threading.Timer, and I've coded it as shown below. However, when I install the service and then start it in MMC, I get a peculiar message: ...
4
by: Henrik H | last post by:
Hi all! I have a Windows service, where I want to use a timer.. But it does not Seems work?? It does not catch the Timer1.tick event ??? But the code works on a form??? Can anyone help me,...
1
by: enzoJava | last post by:
Hii, I have this program and i need help on printing out the total time, can anyone help me on this? If there is a better way to do this let me know Thnx import javax.swing.*; import...
0
by: bg_ie | last post by:
Hi all, I'm writing a .net Com object to read messages from an external bus. Also, under certain situations, I output messages to the bus in order to generate bus load, for testing purposes. An...
1
by: Ismail | last post by:
Hello, I have webform and usercotnrol with asp:Timer on it. I am in tick event doing count down of timer. What i want to do is when the countdown is complete stop the timer. I tried...
2
by: Elliot | last post by:
My program use a timer to 'refresh' a method "a" every several seconds, private void a(object sender, EventArgs eArgs) { Timer T1 = new Timer(); T1.Interval = 100000; T1.Start(); T1.Tick +=...
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
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
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
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,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.