I am trying to accomplish the following:
There is a textarea on the page which has a length of letters
constraint, say 100. Every time a symbol is typed there,a nearby label
tells you how many letters you have left.
I plan to use Ajax to do this.
I googled for a few hours and could not figure out how to do this.
So far what I have done is the follows:
Step 1. Add :remote => true to the form_for method. This form_for method
lives in a partial which is called in app/views/foos/home.html.erb
Step 2. Add
respond_to do |format|
to FoosController's corresponding Home action.
Step 3.create home.js.erb under app/views/foos/
But I do not know how to add something so when a letter is typed in a
textarea inside the form generated by form_for method that home.js.erb
Could someone help me out here?
Posted via http://www.ruby-forum.com/.
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to email@example.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.