House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Textarea Max Size form question

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

Textarea Max Size form question...

You want to use onKeyUp, not onKeyPress, because onKeyPress fires before the Barney Boisvert 04/29/2004 04:22 PM
np Tony Weeg 04/29/2004 04:14 PM
> there is a thread in the last 30 days that discusses this, check the hof Jeff Small 04/29/2004 04:13 PM
<script> Barney Boisvert 04/29/2004 04:11 PM
----- Excess quoted text cut - see Original Post for more ----- Jeff Small 04/29/2004 04:10 PM
there is a thread in the last 30 days that discusses this, check the hof Tony Weeg 04/29/2004 04:09 PM
Okay, so you've got a textarea...you want to make sure it's not more than Jeff Small 04/29/2004 04:05 PM

04/29/2004 04:22 PM
Author: Barney Boisvert Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161735 You want to use onKeyUp, not onKeyPress, because onKeyPress fires before the character is actually typed.  In other words, you trim the string, recount the chars, whatever, and then the character is appended, throwing everything off immediately. Cheers, barneyb ----- Excess quoted text cut - see Original Post for more -----
04/29/2004 04:14 PM
Author: Tony Weeg Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161733 np tw > there is a thread in the last 30 days that discusses this, check the > hof site...its there. > > http://www.houseoffusion.com/cf_lists/index.cfm/method=messages&threadid=317 > 24&forumid=4 > > tony Yeah, the script I dug up was basically the same thing...I kept thinking that I had to submit the form to test that, and completely forgot about the "onkeyup() and onkeypress() events.. Thanks tony!
04/29/2004 04:13 PM
Author: Jeff Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161732 > there is a thread in the last 30 days that discusses this, check the hof > site...its there. > > http://www.houseoffusion.com/cf_lists/index.cfm/method=messages&threadid=317 > 24&forumid=4 > > tony Yeah, the script I dug up was basically the same thing...I kept thinking that I had to submit the form to test that, and completely forgot about the "onkeyup() and onkeypress() events.. Thanks tony!
04/29/2004 04:11 PM
Author: Barney Boisvert Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161730 <script> function checkLength(field, len) {   if(field.value.length > len)   field.value = field.value.substr(0, len); } </script> <form> <textarea onKeyUp="checkLength(this, 10);"></textarea> <input onKeyUp="checkLength(this, 12);" /> </form> ----- Excess quoted text cut - see Original Post for more -----
04/29/2004 04:10 PM
Author: Jeff Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161729 ----- Excess quoted text cut - see Original Post for more ----- perhaps? > I'm not using CFINPUT on any of the other form elements though... Digging a little further, I found this...it rules... http://javascript.about.com/library/scripts/blcounttext.htm
04/29/2004 04:09 PM
Author: Tony Weeg Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161728 there is a thread in the last 30 days that discusses this, check the hof site...its there. http://www.houseoffusion.com/cf_lists/index.cfm/method=messages&threadid=317 24&forumid=4 tony Okay, so you've got a textarea...you want to make sure it's not more than 1024 characters, but you wanna do a clientside check on it... <keanu reeves> What do you do...what DO you do? </keanu reeves> Any scripts or dreamweaver behaviors anyone know of that can be plugged in quickly for an onblur() check? Is there a CFINPUT solution to this perhaps? I'm not using CFINPUT on any of the other form elements though...
04/29/2004 04:05 PM
Author: Jeff Small Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32230#161727 Okay, so you've got a textarea...you want to make sure it's not more than 1024 characters, but you wanna do a clientside check on it... <keanu reeves> What do you do...what DO you do? </keanu reeves> Any scripts or dreamweaver behaviors anyone know of that can be plugged in quickly for an onblur() check? Is there a CFINPUT solution to this perhaps? I'm not using CFINPUT on any of the other form elements though...
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference