Need help with a counter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • DericLanza
    Forum Member
    • Mar 2008
    • 35

    Need help with a counter

    I have a reading test, I need to timer out (3 minutes) the reader.

    How can I set a variable to count in minutes?
  • RizlaUK
    Indigo Rose Customer
    • May 2006
    • 5552

    #2
    in your projects page on show event start a timer for every 1 second

    Code:
    Page.StartTimer(1000);
    Counter=0
    in your projects page on timer event put this
    Code:
    if Counter == 180 then
        -- counter limit reached
        Page.StopTimer()
        Counter=0
        -- your code here
    
    
    else
        Conter=Counter+1
    end
    you can then use "Page.StartTimer(1000)" in a button or page load or wherever to start the 3 min timer, it will stop automaticly when the limit is reached, remember to reset the "Counter = 0" if the user dose not time out

    hope that helps
    Last edited by RizlaUK; 07-03-2008, 06:50 PM.
    Embrace change in your life, you never know, it could all work out for the best

    Comment

    Working...
    X