Results 1 to 6 of 6

Thread: How to include html in Tool Tip Script

  1. #1
    Join Date
    Oct 2005
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to include html in Tool Tip Script

    1) Tool Tip II:

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...mltooltip2.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.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    ddrivetip('paragraph1<br>paragraph2')

    I expect that should work.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2005
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    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>
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Oct 2005
    Posts
    86
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.)

  6. #6
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    It does allow HTML. You just need to code it correctly, aka close all the tags before finishing with the value. Example:

    Code:
    ddrivetip('<p>lorem ipsum</p><p>et donor</p>')
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •