D
Doc
Hello!
I'm experiencing a little problem counting the number of characters in
a textarea on a html page.
This is the content type of my HTML document
content="text/html; charset=iso-8859-1"
I have a textarea that I want to limit to 400 characters, but the
enduser can enter special characters (like €, v, 8, ...). I have
to limit it because I have a limit in my database and I don't want my
webapp to hang...
I tried counting the characters with a javascript function, but it
doesn't work with these special characters as 'v' is stored in the DB
as '√' My character count is not right (well for the DB...) and I
can get an error when saving.
Can somebody help me? Can I do it otherwise (always checking the input
on the JSP (HTML).
Thanks
I'm experiencing a little problem counting the number of characters in
a textarea on a html page.
This is the content type of my HTML document
content="text/html; charset=iso-8859-1"
I have a textarea that I want to limit to 400 characters, but the
enduser can enter special characters (like €, v, 8, ...). I have
to limit it because I have a limit in my database and I don't want my
webapp to hang...
I tried counting the characters with a javascript function, but it
doesn't work with these special characters as 'v' is stored in the DB
as '√' My character count is not right (well for the DB...) and I
can get an error when saving.
Can somebody help me? Can I do it otherwise (always checking the input
on the JSP (HTML).
Thanks