Re: Can we limit the text in textarea

2001-06-04 Thread Michael Dinowitz
This can be done with JavaScript. There's a custom tag in the gallery to do it. Is there a way to limit the number of characters someone can type in in a textarea input box? Thanks AB ~~ Structure your ColdFusion code with Fusebox. Get the

RE: Can we limit the text in textarea

2001-06-04 Thread Kelly Matthews
Well there isn't a maxlength BUT after they hit submit, on the action page, before it processes anything else, you can have CF COUNT the characters in that string and if they exceed a certain number you can give them a message telling them so. There are also javascripts that will count

RE: Can we limit the text in textarea

2001-06-04 Thread Matthew Fusfield
Not with straight HTML, but you can do it with JavaScript - something like onKeyPress=if(document.FORMNAME.TEXTAREANAME.value.length 500) { alert('Only 500 characters allowed') } You can also do it, obviously, when the form is submitted: cfif Len(form.TEXTAREANAME) GT 500 cfabort

RE: Can we limit the text in textarea

2001-06-04 Thread Mark W. Breneman
There are two ways that I am aware of. One make Cf show a Please limit your input to 125 letters message with server side validation. The other is to use java script.(client side validation) http://javascript.internet.com/forms/limit-textarea.html Mark W. Breneman -Cold Fusion Developer

RE: Can we limit the text in textarea

2001-06-04 Thread Sandy Clark
You can do it in Javascript function lencheck(obj_value, len){ // Returns true if value is less than or equal to length, // otherwise returns false. if (obj_value.length = len){ return true; } else { over = obj_value.length - len;

Re: Can we limit the text in textarea

2001-06-04 Thread W Luke
Try something like this. This (should) restrict the textarea to 800 characters, and display how many characters are remaining, in a seperate textbox: SCRIPT LANGUAGE=JavaScript !-- Begin function textCounter(field, countfield, maxlimit) { if (field.value.length maxlimit) // if too

Re: Can we limit the text in textarea

2001-06-04 Thread James Taavon
Yes, Javascript. This is what I used. cfif #Len(form.descrip)# GT 750 SCRIPT LANGUAGE=JavaScript TYPE=text/javascript !-- alert ('Your Description exceeds the space alotted. If more detail is required submit description as Word document file.')

RE: Can we limit the text in textarea

2001-06-04 Thread Peter Tilbrook
Try this: html head titleMy Page/title script language=JavaScript function textCounter(field, countfield, maxlimit) { if (field.value.length maxlimit) field.value = field.value.substring(0, maxlimit); else countfield.value = maxlimit - field.value.length; } function openWin( windowURL,