how to add js event in text_area

Have you seen the observe_field helper in Rails? Look it up. You can give it a field id and a function, and it will bind them together to watch for input. You can also make it polling-based and give it a frequency option in seconds.

There is a sister helper called observe_form.

Chad

Chad Fowler wrote:

Have you seen the observe_field helper in Rails? Look it up. You can give it a field id and a function, and it will bind them together to watch for input. You can also make it polling-based and give it a frequency option in seconds.

How would it trigger on, say, the <F8> key?