I'm new to Rails and Web development, I have a problem about how to
"bind a JS event to a field within form_for block".
I have a JS function called checkLength, which is used to check the
length of words typed in a text area field:
HTML code with JS event invocation
<textarea id="micropost" name="micropost" rows="4" cols="60"
Now I would like to reuse this JS funtion in another Rails view page,
which the src code is listed below:
<%= form_for @micropost do |f| %>
<% end %>
The question is after I put the JS function under RAILS_APP/public/
HOW CAN I ADD AN EVENT AT THE TEXT_AREA FIELD WITHIN THE CODE :
f_text_area :content AND CALL THE JS FUNCTION LIKE :
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 email@example.com.
To unsubscribe from this group, send email to firstname.lastname@example.org.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.