PDA

View Full Version : imgtip image problem



ivybridge
12-09-2011, 03:51 PM
1) tooltip v2.0

2) http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

3) Have installed this script and whilst when i mouse over a text hyperlink, the description and bordered box appear, the image does not.

All image files, js, css and htm files are in the same directory.

However when I roll over the text link, the image box appears with the title but no image. I dont understand as all files are in the same directory.

the line that calls the imgtip is



<dl><dt><a href="../files/machines/Lapmaster 15 OF 3R.pdf" target="_blank" rel="imgtip[0]">Lapmaster Model 15 Open Face</a></dt>

the js file line is

tooltips[0]=["AAA2.gif", "Lapmaster model 15", {background:"white", font:"bold 12px Arial"}]

Just cant figure why the image cannot be found...?

jscheuer1
12-09-2011, 04:26 PM
Upper and lower case of the image files might be out of whack visa vis how they are in the code and how they actually are on the server. These must match exactly on the web. Like:

AAAA2.gif

is not the same as:

aaaa2.gif

And neither are the same as:

AAAA2.GIF

Or it could be some other problem.

If you want more help:

Please post a link to a page on your site that contains the problematic code so we can check it out.

ivybridge
12-09-2011, 04:58 PM
Thanks for the tip, but I checked this as I have been caught before.

jscheuer1
12-09-2011, 05:35 PM
Please post a link to a page on your site that contains the problematic code so we can check it out.

ivybridge
12-09-2011, 06:06 PM
http://www.lapmaster.co.uk/downloads/rollover.htm

I have only been experimenting on the first two links.

jscheuer1
12-09-2011, 06:16 PM
Your copy of ddimgtooltip.js has been edited or has become corrupted. Here (highlighted line edit/corruption red):


createtip:function($, tipid, tipinfo){
if ($('#'+tipid).length==0){ //if this tooltip doesn't exist yet
return $('<div id="' + tipid + '" class="ddimgtooltip" />').html(
'<div style="text-align:center"><img src="../../../' + tipinfo[0] + '" /></div>'
+ ((tipinfo[1])? '<div style="text-align:left; margin-top:5px">'+tipinfo[1]+'</div>' : '')
)
.css(tipinfo[2] || {})
.appendTo(document.body)
}
return null
},

and perhaps other places.

If you don't know how this happened and/or cannot fix it, get a fresh copy from the demo page. Edit it only in a text only editor like NotePad.

ivybridge
12-09-2011, 09:11 PM
Well spotted, thats sorted it nicely.