problem text area

Results 1 to 2 of 2

Thread: problem text area

  1. #1
    Join Date
    Dec 1969

    Default problem text area

    v easy one this<BR> .. how do i set the max length for a text area<BR><BR> thanks in advance<BR><BR>pete

  2. #2
    E! Guest

    Default RE: problem text area

    You want to limit the amount of text a user can input? Here is some Javascript code:<BR><BR> function chkLen(s,inLen,errString) <BR> {<BR> var len=s.length<BR> if(len&#062;inLen)<BR> {<BR> alert("The "+errString+" field is too long!
    The max size is "+inLen+" and you have "+len+".
    Please shorten this field.")<BR> return true<BR> }<BR> return false<BR> }<BR><BR><BR> if(chkLen(form1.txtarea.value,100,"Text Area"))<BR> {<BR> form1.txtarea.focus()<BR> return false<BR> }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts