Hi
Thanks very much for replying to my problem. I don't know if I'm being a
bit thick but I've copied the code and tried to test it but it doesn't work.
I've copied the code used below. Am I missing something basic?
<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;
}
// End -->
</script>
<!-- textCounter() parameters are: Text field, the count field, max
length -->
<center>
<form name=myform action="http://www.netevolution.co.uk">
<font size="1" face="arial, helvetica, sans-serif"> ( You may enter up To
125 characters. )<br>
<textarea name=message wrap=physical cols=28 rows=4
onKeyDown="textCounter(this.form.message,this.form .remLen,125);"
onKeyUp="textCounter(this.form.message,this.form.r emLen,125);"></textarea>
<br>
<Input readonly Type=Text name=remLen size=3 maxlength=3 value="125">
characters Left</font>
</form>
</center>
"Martha Graham" <martha (AT) dmxzone (DOT) com> wrote
Quote:
Hi Andi,
I found this script:
http://www.ex-designz.net/codemanager2/script_description.asp?ScriptID=340
Hope it helps you.
Martha Graham
www.DMXzone.com
"Andi Fenner" <andi.fenner (AT) domnickhunter (DOT) com> schreef in bericht
news:bee26l$mte$1 (AT) forums (DOT) macromedia.com...
Does anyone know the Javascript to limit the amount of characters a user
can
type into a text box.
Any help would be appreciated.
Ta, Andi |