PDA

View Full Version : Image w/ description tooltip



Lady Rogue
01-05-2010, 01:47 AM
1) Script Title: Image w/ description tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.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?id=27625&access_key=58dde1dcabc2d80902f22074f5dc005c&t=4b429a35&o=3E77FACA25BC908590132765809E21E02377FBD627EAC19D95592361829E52B87B36A7D640DF8C99890F3A&name=scrollbox.html

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

jscheuer1
01-05-2010, 06:37 AM
You need to escape apostrophes (') within the text portions with a downslash (\), ex - she\'s:


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");

Lady Rogue
01-05-2010, 07:28 AM
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?id=27629&access_key=0e3f6cc0e57a222a5d4fec322ad4f4ed&t=4b42e996&o=D1A56F3CB3516CA6B4F056AEE3289A41CCA56E20E05168BFB7E906A8E128E91994E43220D63270BAADEC4B&name=testcode.html

jscheuer1
01-05-2010, 08:02 AM
That's all you have. The first one's:


<a href="#" onmouseover="doTooltip(event,0)" onmouse . . .

All the rest are:


<a href="#" onmouseover="doTooltip(event,1)" onmouse . . .

Try some of the other numbers.

Lady Rogue
01-05-2010, 08:28 PM
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/

jscheuer1
01-05-2010, 09:39 PM
The script on that page is corrupt. I'd say try reinstalling it. For example, it has:


//////////////////// 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:


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