Hi, We are interested in using "hover help" in rails - that is, we want to be able to hover over a link and have a help bubble pop up. Using link_to like so: <%= link_to "?", "", :title => "<center><b>Select Language</b></ center> <table style="padding:5px"> <tr><td><i>All</i></td><td>For the intersection of search results.</ td></tr> <tr><td><i>Any</i></td><td>For the union of search results.</td></tr> <tr><td><i> ⌘</i></td><td>To select more than one language.</td></tr> </table>" %> Is it possible to use HTML in the :title attribute? As it stands now, the entire thing shows up as a string, and removing the quotation marks makes it throw a compilation error. ~Jillian --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org 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 -~----------~----~----~----~------~----~------~--~---
Jillian wrote:> <%= link_to "?", "", :title => "<center><b>Select Language</b></ > center>Your attempt simply passes raw HTML into the title=''''. Rails assumes your < symbols are content, such as "cat < dog", and either it escapes them, or it passes them thru and they break your page''s HTML. You need to learn to do tooltips at the JS level directly, before invoking them from a Rails helper. Because the common word for this technique is "tooltip", and Rails''s favorite JS library is prototype.js, a Google for [prototype.js tooltips] will give good hits. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---