Hello guys I am trying to implement mouse-over definitions for our website and interested in knowing the best practice for implementing such a thing. it is basically a definition popping up when you move the mouse over a technical term ... the definition comes from glossary.
Is there xml way to implement it.. defining glossary in xml file Thanks, Greg Valenti. SCJP
The advantage of using acronym or abbr over a simple span is that it makes them easy to style using a tag selector.
On the dynamic front, you did not mention how your definitions are stored. In any case, I'd create a custom action (tag) that would accomodate your back-end needs.
For example, if your descriptions were off in a properties file, a tag along the lines of:
could take the value of the descriptionKey attribute (in this case 'whatever') and look it up as a property, and then emit the appropriate acronym or abbr tag as appropriate.
Joined: Jun 09, 2003
Jayesh, I looked at the link .. it looks like all the words and definitions/tips are in the same page.
What if I maintain a glossary file(xml or db) as a seperate file and when ever a word in the glossary appears on any page in the website.. it should automatically appear with a tooltip when mouse is hovered above it. In that way.. so that any changes in glossary file will be reflected in the website.
Please let me know if you have implemented such a functionality. Thank you.
Joined: Nov 05, 2004
Sure!! many times!! What you need to do is have your backend code(Struts action or whtever) retreive the data for the tooltip and pass the data as a request attribute to your jsp page. The Jsp page can then generate the DIV tags for the tool tips. This would be the standard way of doing things
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com