Start/Stop Timer at client-side

Rate It (1)

Last post 09-20-2006 5:23 AM by Evert. 3 replies.

Sort Posts:

  • Start/Stop Timer at client-side

    08-20-2006, 5:01 PM
    • Member
      116 point Member
    • awj
    • Member since 07-29-2005, 5:34 PM
    • Posts 65
    Hi,

    I know there have been posts on this subject before but they're a few months old so I'm wondering if there's a neater way in the more recent CTPs:

    How can I start and stop an Atlas timer at the client-side? I know fine how to click a button to cause a postback and have the timer start but I'm looking for a way to do it using js at the client-side (I want to be able to click an ImageButton and have the timer start).

    Any ideas?
  • Re: Start/Stop Timer at client-side

    08-21-2006, 3:53 AM
    • Contributor
      7,416 point Contributor
    • Garbin
    • Member since 09-17-2004, 12:35 PM
    • Sassari, Italy
    • Posts 1,506
    • ASPInsiders
      TrustedFriends-MVPs
    Hi,

    the timer can be started/stopped with a call to the set_enabled(true/false) method. If you are using the atlas:TimerControl, you can have problems to find the timer reference on client-side since the server control is not assigning an ID to the instance.

    Luis Abreu has posted a modified version of the TimerControl that assigns an ID to the timer instance. Do a search on the forum and you'll find the corresponding thread.

    Another solution is to create the timer on client-side.
    Alessandro Gallo | Blog | My book: ASP.NET AJAX In Action
  • Re: Start/Stop Timer at client-side

    08-21-2006, 4:18 AM
    • Member
      10 point Member
    • Accept93
    • Member since 08-21-2006, 8:14 AM
    • Posts 2

    This problems was solved and published at codeproject site. Look at this URL http://www.codeproject.com/useritems/stoppabletimer.asp

    It's realy working)) Good luck

  • Re: Start/Stop Timer at client-side

    09-20-2006, 5:23 AM
    • Member
      5 point Member
    • Evert
    • Member since 09-20-2006, 3:08 AM
    • Posts 1

    Excelent work. It works perfect for me!

    Thanks all.

Page 1 of 1 (4 items)