Results 1 to 2 of 2

Thread: Textarea Limiter

  1. #1
    Join Date
    Mar 2006
    Location
    Buffalo, NY
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Textarea Limiter

    I am playing around with one of the scripts on dynamicdrive.com, it is the one that limits a textarea and outputs how many characters are left. The script is located here (http://www.dynamicdrive.com/dynamici...limitinput.htm). Using the script provided on that page if I was to already have characters in the textarea like this:

    Code:
    <form name="sampleform" action="post" method="test.html">
    <textarea id="field1" name="field1" cols="50" rows="15">Text Here</textarea><br>
    <font face="Verdana" size="1">Max 50; characters remaining: <script>displaylimit("document.sampleform.field1", "", "50");</script>
    The display of how many characters does not show that there are 9 characters gone, it still shows that there are 50 available until the user enters a character, then it displays how many are really left.

    I was wondering how could I have this script tell me how many characters are in the textarea at all times?

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    This script is very dodgy indeed. I wouldn't bother with it, if I were you.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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