
March 30th, 2000, 10:09 AM
|
|
Contributing User
|
|
Join Date: Feb 2000
Location: Aalborg, Denmark
Posts: 36
Time spent in forums: < 1 sec
Reputation Power: 9
|
|
Hi
I have a page where i need to count the chars in a user input dynamically. As of right now i just parse .value.lenght to a field, but i need to parse the exact chars, not including spacees and newlines.
Any ideas of how to do this?
My first idea was to use indexOf(" ") to find the first occurente of a space and then loop indexOf(" ", previousOccurence) until it equalled lastIndexOf(" "); But either it dosn't work or i screwed up in the syntax
Any ideas are welcome
// Martin
|