• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Creating ToolTips in JSTL code?

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'd like to use the browser's ability to display tooltips using the built-in 'title=' syntax:

<div id = "someId" title="Tool Tip Text" ...

tags here that would show the tool tip text

</div>

The problem is that this type of tool tip display doesn't work (or at least I can't get it to work) with a JSTL variable using "${someVariable}". The "title=" syntax seems to only work with a hard-coded string.

So, what's the best way to display a tooltip when you have, say a list in a loop that populates a drop down list on a JSP page when the population mechanism is a JSTL loop?

Thanks in advance for any suggestions.

Mike
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First, the "${}" syntax is EL (Expression Language) not JSTL.

Second, it doesn't make any difference what server side mechanism you use to create the text. The results of JSTL, Scriptlets, EL, Perl, PHP, ASP, etc... is text that gets sent down to the browser.

If your tooltips are not working, the first step toward debugging them would be to use your browser's "view source" option to see exactly what's being sent. From there you should have a good idea where to look.
 
"How many licks ..." - I think all of this dog's research starts with these words. Tasty tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic