[Rails] Rails 3.1 - Need to show a JS pop-up with the contents of a field - can it be easily done?
<td><%= simple_format car.description.truncate(200, :separator => ' ') %></td>
I need a mouse over or click event to generate a simple pop up window (an "alert", a "tool tip", a "dialog", etc.) displaying the full contents of the car.description field.
I'm an admitted JS rookie. All the JS-Rails tutorials/information that I'm seeing are focused on unobtrusive JS, focused mostly on AJAX/remote server interactions. I'm not seeing anything that helps understand how you can use data from your Rails application in rich JS UI features within your views. I saw a tool tip gem, but with that gem, tool tip content is statically generated, and tool tips are held in their own table. No way to generate a tool tip on the fly, based on a field pulled from the database.
Is there some very, very simple way to have JS pop up the text held in a Rails field?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/nivOQMBsegcJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home