views:

66

answers:

1

For example, the comments in SO shows the number of allowable characters remaining. Basically, how do I do that in ruby on rails?

A: 

This can be done on JavaScript side, as mentioned in comment.

This page provides nicely explained example: Interactive character limit for textarea using jQuery (it also contains an example of doing it without jQuery).

Rene Saarsoo
HOw do I install the jQuery library? I think rails only comes with prototype?
Angela
I guess you are better off implementing it with Prototype if you are already using it.
Rene Saarsoo
um, how do I add the onkey when using ruby on rails textarea?
Angela
nevermind....I implemented it and it's not showing up. I put the javascript code into the actual application.js file which is called and I checked the source code.
Angela
Hi, I am using the non-jQuery method and it doesn't appear to be working. Any experience on this?
Angela
Well it's kind of hard to guess what could be wrong. It would be best if you provided a link to your site.
Rene Saarsoo