Textarea - maxlength?

Results 1 to 4 of 4

Thread: Textarea - maxlength?

  1. #1
    Karel Guest

    Default Textarea - maxlength?

    Hi,<BR><BR>how can you set a textarea&#039s maxlength( for example 250 characters)<BR>In a textbox( input type), you can do this with the &#039maxlength&#039<BR>How to do this in a texarea??<BR><BR><BR>

  2. #2
    Nathan Pond Guest

    Default RE: Textarea - maxlength?

    I would just use javascript (if IE only you could make a behavior to control it). Just check textareaname.length in Javascript.<BR><BR>Hope I helped<BR><BR>Nathan Pond<BR><BR>btw... I don&#039t think there is a tag for it, especially if MAXLENGTH doesn&#039t work.

  3. #3
    Karel Guest

    Default RE: Textarea - maxlength?

    Hi Nathan,<BR><BR>I&#039m sure that your solution will work(javascript), but could you give a little bit more explanation, because I&#039m just a beginner in ASP programming<BR><BR>Thanks in advance<BR><BR>Karel

  4. #4
    Join Date
    Dec 1969

    Default RE: Textarea - maxlength?

    This is how you can do it in VBScript... this won&#039t help you if you need it to be compatible in other browsers. The "FORM" equals the name of your form and "FIELD" equals the name of the textarea field:<BR><BR>function document_onkeyup<BR> x=len(FORM.FIELD.value)<BR> if x>250 then<BR> FORM.FIELD.value=mid(FORM.FIELD.value,1,250) end if<BR>end function

Posting Permissions

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