Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Creating ToolTips in JSTL code?

Posts: 1829
  • 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


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.

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.
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic