<script type="text/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;
}
// End -->
</script>
<textarea name="gbmessage" wrap="physical" class="formveld" rows="6"
cols="42"
onKeyDown="textCounter(this.form.gbmessage,this.form.remLen,300);"
onKeyUp="textCounter(this.form.gbmessage,this.form.remLen,300);"></texta
rea>
Steve LaBadie, Web Manager
East Stroudsburg University
200 Prospect St.
East Stroudsburg, Pa 18301
570-422-3999
[EMAIL PROTECTED]
http://www.esu.edu
-----Original Message-----
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Monday, April 02, 2007 11:59 AM
To: CF-Talk
Subject: "maxlength" on text area - how to approximate
Does anybody have a really good way to create the equal of "maxlength"
on a text area? The server running site in question is only running CF 6
something, not 7, so cftextarea won't work...
I've tried a couple of javascript ideas, and as long as you're typing
input, it works. But, everything I tried so far will allow pasting more
than the max set.
I'm checking server side before the data insert, but the client wants to
see something client side while the form is being filled out.
Ideas?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274320
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4