char counter

Results 1 to 2 of 2

Thread: char counter

  1. #1
    Join Date
    Dec 1969

    Default char counter

    anyone know of a way to count the number of charters in a textarea then display a message when a limit of say 250 is reached??

  2. #2
    Join Date
    Dec 1969

    Default RE: char counter

    document.FormName.TextAreaName.value.length<BR><BR >So, somehow, you need to repeatedly test the length of the string. Either you can capture it in the onChange() event handler, or in the onKeyUp event handler (note: limited browser coverage for this one), or you could set up a function that checks the length of the area every 0.5 seconds or something (note: performance issues with this one, might want to stop/start onFocus and onBlur).<BR><BR>Craig.

Posting Permissions

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