Maxlength is only an attribute of cftextarea I believe.

You should read the LiveDocs on this, you must specify what to validate
and when. Anyway, here is an example to get you started:

<cftextarea name="word_input" cols="60" rows="8" wrap="virtual"
onkeyup="f=document.form_count;
f.word_count.value=f.word_input.value.length;" validate="maxlength"
validateAt="onBlur" maxlength="256"></cftextarea>


[email protected] on Wednesday, September 20, 2006 at 3:14 PM
-0800 wrote:
>This question is related to what we have been doing.  The whole purpose
>that I have been creating this is because the text in the text box is
>going to be stored inside a database - a maximum of 256 characters.  I
>wanted the user to know how many characters they have used.
>
>Here is my question, how come when I use the maxlength option on the
>cftextarea, it doesn't stop the user at that number like it does when I
>use the maxlength option on the cfinput?  
>
><cftextarea name="question1TEXT" maxlength="256"
>onkeyup="f=document.form_count;
>f.word_count1.value=f.question1TEXT.value.length;" rows="3" cols="100"
>wrap="virtual"></cftextarea>
>
>Any ideas?
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2078
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to