try this code it works great

<script language="JavaScript">
<!--
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
countfield.value = maxlimit - field.value.length;
}
//-->
</SCRIPT>




then in the form use this code

 <TEXTAREA name="message"
onKeyDown="textCounter(this.form.message,this.form.remLen,2999);"
onKeyUp="textCounter(this.form.message,this.form.remLen,2999);"
class="CONTENT8" cols="70" rows="10"></TEXTAREA>
                             <br>
                                                        <input readonly type=text 
name=remLen size=3 maxlength=3
value="2999"> <span class="content8red">characters left</span>

matt friedman

-----Original Message-----
From: Nick Varner [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 17, 2002 4:32 PM
To: CF-Talk
Subject: textarea


Since there is not a cftextarea, how do I through up an alert in javascript
telling the user they have entered to many characters in a  textarea. I know
this is off subject but any help would be appreciated.

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to