Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1

Thread: text counter

  1. #1
    Senior Coder
    Join Date
    Nov 2010
    Posts
    1,341
    Thanks
    260
    Thanked 32 Times in 31 Posts

    text counter

    Hi i am using a text counter for my textarea, the problem is that when a member edits their profile, unless they actually keydown inside the text area then it will not load their text in the counter.

    I know the reason is the onkey deal, but im not sure how to load the text in the counter on page load. I guess on register the onkey is fine becaue its usually blank, but on edit i need it to load the number of chars in the counter automatcally. It loads the text fine on page load, it just does not increment the counter unless you keydown inside the box.

    Code:
    <textarea class="inputl" rows="8" name="txtComment" cols="59"
     tabindex="15"
     onKeyDown="textCounter(this.form.txtComment,this.form.remLentext);"
      onKeyUp="textCounter(this.form.txtComment,this.form.remLentext);">
     Comment data here </textarea>
    UPDATE nevermind i got it, i found where to load the value.. thanks though
    Last edited by durangod; 09-08-2011 at 11:41 AM.


 

Posting Permissions

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