Results 1 to 6 of 6

Thread: Image w/ description tooltip

  1. #1
    Join Date
    Jan 2010
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Image w/ description tooltip

    1) Script Title: Image w/ description tooltip

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...agetooltip.htm

    3) Describe problem: For some reason when I scroll over the images the boxes do not come up. I went and even did one at a time, but I can only get the first two and then it stays on the 2nd one. Can you please have a look?

    http://www.fileshost.com/getfile.php...scrollbox.html

    I looked and looked for a error in typo, but I just couldn't find it.

  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

    You need to escape apostrophes (') within the text portions with a downslash (\), ex - she\'s:

    Code:
    messages[5] = new Array('http://img177.imageshack.us/img177/1491/julianx.jpg','Taken to a strange, hazardous realm she never knew existed, Asia will face the ultimate choice--between abandoning the life she\'s always known, and forsaking a passion as dangerous as it is powerful.',"#FFFFFF");
    
    messages[6] = new Array('http://img64.imageshack.us/img64/7672/bmagic.jpg','Another equinox is here,  I\'m forced to undergo a drastic ritual that will forever change my life, and the lives of those around me.',"#FFFFFF");
    
    messages[7] = new Array('http://img64.imageshack.us/img64/7582/stonewall.jpg',' His rebellious charade may just become all too real, stirring up a love that tempts him to be a hellion no more.',"#FFFFFF");
    
    messages[8] = new Array('http://img696.imageshack.us/img696/7978/deadlt.jpg','She is obsessed with finding the vampire who murdered her parents. He is intent on protecting his brother and finding out the truth. Only things don\'t work out the way either planned, yet both aim to win the deadly game.',"#FFFFFF");
    Last edited by jscheuer1; 01-05-2010 at 06:47 AM.
    - John
    ________________________

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

  3. #3
    Join Date
    Jan 2010
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I went back and did as you asked. I don't think that I missed any. That being said, It still isn't working correctly. The first and second on work, but when I scroll over any of the others they all popup the image belonging to the second. I am just not seeing where I am messing it up. I redid it one at a time...and I am still not getting it.

    New link to the second try..

    http://www.fileshost.com/getfile.php...=testcode.html

  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

    That's all you have. The first one's:

    Code:
    <a href="#" onmouseover="doTooltip(event,0)" onmouse . . .
    All the rest are:

    Code:
    <a href="#" onmouseover="doTooltip(event,1)" onmouse . . .
    Try some of the other numbers.
    - John
    ________________________

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

  5. #5
    Join Date
    Jan 2010
    Posts
    51
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Ahhh, that did make it easierIt now works in my notebook, but why isn't it working in my blog html widget? Ref: http://escapebetweenthepages.blogspot.com/

  6. #6
    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

    The script on that page is corrupt. I'd say try reinstalling it. For example, it has:

    Code:
    ////////////////////  END OF CUSTOMIZATION AREA  ///////////////////
     
    // preload images that are to appear in tooltip
    // from arrays above
    if (document.images) {
    	var theImgs = new Array();
    	for (var i=0; i<messages.length; startstr="'<table" theimgs[i].src="messages[i][0];
      }
    }
     
    // to layout image and text, 2-row table, image centered in top cell
    // these go in var tip in doTooltip function
    // startStr goes before image, midStr goes between image and text
    var" i++) width="' + tipWidth + '" image();
     {
     theimgs[i]="new"><tr><td width="100%" align="center"><img border="0" src="';
    var midStr = '"></td></tr><tr><td valign="top">';
    var endStr = '</td></tr></table>';
     
    ////////////////////////////////////////////////////////////
    //  initTip	- initialization for tooltip.
    The actual code for that section is:

    Code:
    ////////////////////  END OF CUSTOMIZATION AREA  ///////////////////
    
    // preload images that are to appear in tooltip
    // from arrays above
    if (document.images) {
    	var theImgs = new Array();
    	for (var i=0; i<messages.length; i++) {
      	theImgs[i] = new Image();
    		theImgs[i].src = messages[i][0];
      }
    }
    
    // to layout image and text, 2-row table, image centered in top cell
    // these go in var tip in doTooltip function
    // startStr goes before image, midStr goes between image and text
    var startStr = '<table width="' + tipWidth + '"><tr><td align="center" width="100%"><img src="';
    var midStr = '" border="0"></td></tr><tr><td valign="top">';
    var endStr = '</td></tr></table>';
    
    ////////////////////////////////////////////////////////////
    //  initTip	- initialization for tooltip.
    A big difference. There are probably others. Hopefully it just got corrupted by accident, otherwise there may be some problem(s) with the editor and/or the upload mechanism used to get the script to the blog.
    - John
    ________________________

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

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
  •