Textarea question?

Results 1 to 3 of 3

Thread: Textarea question?

  1. #1
    Join Date
    Dec 1969

    Default Textarea question?

    Is there way to put maxlength in textarea field, b&#039coz I used one but still it accepts more than the maximum limit.<BR>Currently I am using it like this.<BR>&#060;textarea rows="3" cols="34" name="txtName" maxlength="250"&#062;&#060;/textarea&#062;

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default RE: Textarea answer

    Nope<BR><BR>you could check it in client or server side script BEFORE you insert into the DB

  3. #3
    Glen Guest

    Default RE: Textarea question?

    The only way I could get it to work was to put javascript in the page that alerted Mr. User that the text was too long. <BR>E.g.:<BR>if (txtName.length &#062; 250){<BR> alert ("You have entered a name that is " + txtName.length<BR> + " characters long. The maximum length <BR> is 250 characters. Please shorten it.");<BR>}<BR><BR>You can modify the code to make sure that the user can&#039t submit anything until he shortens the length. Depending on what you&#039re page is doing.... <BR><BR>Hope this helps....<BR>yeeehaaa7@yahoo.com

Posting Permissions

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