Reg: text area

how to limit the text area? for eg: if text area consists of only 160
characters,user should not exceeds the limit while typing itself

Shiva S. wrote:

how to limit the text area? for eg: if text area consists of only 160
characters,user should not exceeds the limit while typing itself

Using Javascript
http://www.google.com/search?q=how+to+limit+textarea+size on the
client side, validation on the Rails size.


Jakob S. - http://mentalized.net

Shiva S. wrote:

how to limit the text area? for eg: if text area consists of only 160
characters,user should not exceeds the limit while typing itself

You can either do it by using Javascript, so the user cannot put more
text then 160 char in the textfield, or you can use Rails to cut the
first 160 char and erase the last.

Javascript