Sure is,


this is what I wrote, but I am sure it can be tweaked to be better;  it
fires off of the onKeyDown method for a text area


function check_input_length(){
      var the_counter;
      the_counter = eval(199 - (document.lookup_form.note_text.value.length
+ 1));
      if (the_counter < 0){
        document.all.counter_cell.innerHTML = "0"
       }
       else{
        document.all.counter_cell.innerHTML = the_counter;
       }
      if (the_counter <= 0){
          document.lookup_form.note_text.value =
document.lookup_form.note_text.value.slice(0,199)
        }
     }


HTH


John

-----Original Message-----
From: Robert Orlini [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 8:28 AM
To: CF-Talk
Subject: textarea field limit

Is there any way to limit how much text is put into a textarea field via a
form? I want to prevent too many characters from being typed in similar to
the maxlength field in a onle line text box.

Thx.

Robert O.
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to