PDA

View Full Version : How to include html in Tool Tip Script



vanbao
12-09-2007, 04:38 AM
1) Tool Tip II:

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip2.htm

3) Describe problem: I would like to be able to include html in the tip box so I can change the color of the text. Or if that is not possible, how do have write the tip in 2 short paragraph instead of one continuous paragraph.

djr33
12-09-2007, 05:24 AM
ddrivetip('paragraph1<br>paragraph2')

I expect that should work.

vanbao
12-09-2007, 05:38 AM
Thanks Daniel.

The script is grabbing the tool tip from a field in a database. So in the tempalge ddrivetip(' ') appears, I can only place the field heading of from the database containning the tool tip. Thus, I am trying to find a away where I can write the tool tip in the database so when the information is brougt to the screen, it appears as two paragraphs. I tried to enter my tool tip in the database as paragraph1<p>paragraph2. However, that did not work.

djr33
12-09-2007, 05:41 AM
not sure what to tell you then; also, that floating <p> is strange. You'd need, instead, open and close tags for all paragraphs-- <p>...</p><p>...</p>

vanbao
12-09-2007, 05:50 AM
I wonder if the script has an option to allow html. Currently, any html is being ignored. (maybe my database is not displaying the html.)

tech_support
12-09-2007, 06:33 AM
It does allow HTML. You just need to code it correctly, aka close all the tags before finishing with the value. Example:


ddrivetip('<p>lorem ipsum</p><p>et donor</p>')