Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic values for HTML-element attributes

 
Paul Bruynel
Greenhorn
Posts: 1
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of using hard coded strings for HTML-attributes I'd like to assign values dynamically. For instance I would like to keep values for tooltips in a separate properties-file and refer to these in the title-attribute of a HTML-element. I'm using JSPs, and I don't want to use javascript.
If this is possible, can anyone tell me how I can do this?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you plan on doing this on the client, you have to use JavaScript.

If you want to add the title attribute onto the elements from the server as the page is rendered, than this should be moved into another section of the ranch that deals with the serverside.

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64837
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the <fmt:message> tag of the JSTL.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic