Possible Duplicate:
Count bytes in textarea using javascript
Hello everyone.
I am trying to get the size in bytes of text inside textarea.
by using the following code:
function getSize(obj)
{
return (document.getElementById(obj).value.length);
}
I get the number of chars. (\n count as one char, no Idea why).
anyway, how can I get the size in bytes of text inside textarea?
Thanks