Thread: Timed Text Box

    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2004
    Posts
    18
    Rep Power
    0

    Timed Text Box


    Hello,

    I was wondering how hard it would be to create something like this:

    - Large Text Box in middle of the page (20 lines)
    - When you start typing it starts a timer (2mins)
    - When timer gets to zero it doesn't let you type anymore

    -- Extra: Maybe verify what you typed based on another file (.txt or something else) and highlights what was wrong

    Any help would be awesome. Thanks.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2009
    Location
    Jakarta, Indonesia.
    Posts
    197
    Rep Power
    31
    Hi Donnerschlag.

    Simply put, I think that would require a <textarea>, and a setInterval() timer started at page loads. After 2*60*1000 msecs, the timer should add readonly attribute to that textarea.

    I'm not sure about your "extra"... does this checking happen after the the textarea has been disabled or anytime before? The former is easier I guess, since you only need to load a text file (via AJAX) and perform checking; but the latter might require an keyup event handler be installed to the textarea.

    Hendra

IMN logo majestic logo threadwatch logo seochat tools logo