Results 1 to 10 of 10

Thread: Image w/ description tooltip

  1. #1
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Image w/ description tooltip

    1) Script Title: Image w/ description tooltip

    Hey, I would like to use the Image w/ description tooltip script but on a mapped images instead of text. Could anyone help me figure out the scripting for that? I have tried but can't figure it out. Thanks!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default multiple messages

    this script works excellently for what i am trying to do! I ran into a problem in my latest attempt though. For about 1-7 messages this script works fine.. is there something in the code that stops it from working with more than 7 messages.. the loop should take care of everything, but i'm not the best at javascript.. currently i have 17 messages setup and 4 of them used to work until i added the other 13.. now none work! any help would be greatly appreciated!! The max i have gotten working is 7, possibly something with going over 10?

    http://www.dynamicdrive.com/dynamici...agetooltip.htm

    Thanks, Brian

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by pumakuma View Post
    this script works excellently for what i am trying to do! I ran into a problem in my latest attempt though. For about 1-7 messages this script works fine.. is there something in the code that stops it from working with more than 7 messages.. the loop should take care of everything, but i'm not the best at javascript.. currently i have 17 messages setup and 4 of them used to work until i added the other 13.. now none work! any help would be greatly appreciated!! The max i have gotten working is 7, possibly something with going over 10?
    No. The number is virtually unlimited. I once helped a fellow with 1000's of tips. Only problem there was the length of time it took to load the script.

    What you probably have is some type of syntax error that is breaking the array. The most common one's are:
    1. Not escaping an apostrophe within a delimited value, ex:

      bad:
      Code:
      messages[0] = new Array('red_balloon.gif','Here's a red balloon on a white background',"#FFFFFF");
      good:
      Code:
      messages[0] = new Array('red_balloon.gif','Here\'s a red balloon on a white background',"#FFFFFF");
    2. Leaving out a comma.
    3. Skipping a number, ex:

      Code:
      messages[0] = new Array('red_balloon.gif','Here is a red balloon on a white background',"#FFFFFF");
      messages[1] = new Array('duck2.gif','Here is a duck on a light blue background.',"#DDECFF");
      messages[3] = new Array('test.gif','Test description','black','white');
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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

    Default

    If there is still a problem, linking to your page will clear things up, most likely.
    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

  6. #6
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I went through and check all of my messages.. only one had an apostrophe (') and i had already escaped it. the syntax is correct because i copied and pasted it from my previous ones that worked, plus i double checked (although I don't always find everything). I honestly don't see anything wrong with it.. Can I upload the messages for a double check? Could it possibly be because of the html i have inside the message? although this didn't stop the original messages from working properly..

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Well, I did say 'probably'. It would be best if you could link us to two pages, one that works and one that doesn't. If you want to upload (attach) or paste your array to a message, I can check it. But, if the problem is something else, that won't tell me what it is. If you provide links to demo pages, I should be able to easily see any problem(s), with the arrays or otherwise.

    If you choose to paste your code into a message here, use:

    [code][/code]

    tags around it so that it looks like so:

    Code:
    code here
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://esradio.net/cota/new%20site/webquests.php -- This one works
    http://esradio.net/cota/new%20site/aboutme.php -- this one doesn't work

    (Possibly a stupid mistake somewhere..)

    Code:
    messages[0] = new Array('','<strong>Total Hits:</strong> <div class="style2">This is the total number of times this website has been viewed by anyone (Same IP\'s)</div>','black','white');
    
    messages[1] = new Array('','<strong>Unique Hits:</strong> <div class="style2">This is the total number of times this website has been viewed by individuals. (Separate IP\'s)</div>','black','white');
    
    messages[2] = new Array('','<strong>Your Visits:</strong> <div class="style2">This is the total number of times this website has been viewed by you. (Your IP)</div>','black','white');
    
    messages[3] = new Array('images/momias.jpg','<strong>Las Momias:</strong> <div class="style2">The Mummies</div>','black','white');
    
    messages[4] = new Array('images/taos.jpg','<strong>Taos, New Mexico:</strong> <div class="style2">My HomeTown<br><br>http://www.taoschamber.com</div>','black','white');
    
    messages[5] = new Array('images/monroe.jpg','<strong>Monroe, Louisiana:</strong> <div class="style2">Birthplace<br><br>http://www.monroe.org</div>','black','white');
    
    messages[6] = new Array('images/stanford.jpg','<strong>Stanford University:</strong> <div class="style2">Where I got my undergraduate degree<br><br>http://www.stanford.edu</div>','black','white');
    
    messages[7] = new Array('images/germany.jpg','<strong>Germany:</strong> <div class="style2">Parents stationed there in the Air Force:*Four Years spent here!<br><br>http://www.germany-tourism.de</div>','black','white');
    
    messages[8] = new Array('images/unm.jpg','<strong>University of New Mexico:</strong> <div class="style2">Where I got my second bachelors and masters degrees<br><br>http://www.unm.edu</div>','black','white');
    
    messages[9] = new Array('images/trenton.jpg','<strong>Trenton, New Jersey:</strong> <div class="style2">Second Grade!<br><br>http://www.ci.trenton.nj.us/</div>','black','white');
    
    messages[10] = new Array('images/iowa.jpg','<strong>Sioux City, Iowa:</strong> <div class="style2">The third place I was in first grade...military base there...go ask your dad<br><br>http://www.sioux-city.org/</div>','black','white');
    
    messages[11] = new Array('images/vegas.jpg','<strong>Las Vegas, Nevada:</strong> <div class="style2">A fun place for escape from the real world!<br><br>http://www.lasvegasnevada.gov/</div>','black','white');
    
    messages[12] = new Array('images/mexico.jpg','<strong>Mexico:</strong> <div class="style2">yes, Mexico
    Not your border towns<br><br>http://www.lonelyplanet.com/worldguide/destinations/north-america/mexico</div>','black','white');
    
    messages[13] = new Array('images/oaxaca.jpg','<strong>Oaxaca:</strong> <div class="style2">One of the most beautiful places on earth<br><br>http://www.oaxaca-travel.com/</div>','black','white');
    
    messages[14] = new Array('images/cancun.jpg','<strong>Cancun:</strong> <div class="style2">Great place for snorkeling<br><br>http://www.allaboutcancun.com/</div>','black','white');
    
    messages[15] = new Array('images/guanajuato.jpg','<strong>Guanajuato:</strong> <div class="style2">Las momias....need I say more?<br><br>http://www.donquijote.org/guanajuato/</div>','black','white');
    
    messages[16] = new Array('images/DF.jpg','<strong>DF:</strong> <div class="style2">One of the world\'s largest cities<br><br>http://www.tourbymexico.com/df/df.htm</div>','black','white');
    
    messages[17] = new Array('images/sanmiguel.jpg','<strong>San Miguel Allende:</strong> <div class="style2">A great place to see what Europe looked like centuries ago<br><br>http://www.portalsanmiguel.com/</div>','black','white');

  9. #9
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    messages[12] has a line break in it. It should be:

    Code:
    messages[12] = new Array('images/mexico.jpg','<strong>Mexico:</strong> <div class="style2">yes, Mexico Not your border towns<br><br>http://www.lonelyplanet.com/worldguide/destinations/north-america/mexico</div>','black','white');
    Not:

    Code:
    messages[12] = new Array('images/mexico.jpg','<strong>Mexico:</strong> <div class="style2">yes, Mexico
    Not your border towns<br><br>http://www.lonelyplanet.com/worldguide/destinations/north-america/mexico</div>','black','white');
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  10. #10
    Join Date
    Oct 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you! that fixed it!

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
  •