Thanks John. I'm new to _javascript_ some what. Is the "199" the limit of the number of characters?
RO
-----Original Message-----
From: John Stanley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 17, 2004 8:38 AM
To: CF-Talk
Subject: RE: textarea field limit
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]
- textarea field limit Robert Orlini
- RE: textarea field limit John Stanley
- RE: textarea field limit Pascal Peters
- Re: textarea field limit Stephen Moretti
- RE: textarea field limit Robert Orlini
- RE: textarea field limit John Stanley
- RE: textarea field limit Robertson-Ravo, Neil (RX)
- RE: textarea field limit Robert Orlini