View Full Version : Image w/description tooltip problem

09-13-2007, 06:41 AM
1) Script Title: Image w/ description tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm

3) Describe problem: I can get the script to work when I copy & paste the code to a new HTML page but I'm unable to get it to work, e.g. the popup image will not display when I add the script to an existing webpage.

I've tried moving the tipDiv script around because maybe it was positioning but that doesn't work.

I'm wondering if it's because I've got another rollover javascript also running for side navigation buttons? I've repositioned the script before & after the rollover script but no diff?

My code can be viewed here: http://www.designbynature.co.nz/menstyles2.html

Working script: http://www.designbynature.co.nz/mouseover_image.html

Stumped, please help...


09-14-2007, 05:15 AM
The problem seems to be due to the dual window.onload references you have on your page, causing a conflict.

Find the line:

window.onload = initTip;

and try changing that to:

if (window.addEventListener)
window.addEventListener("load", initTip, false)
else if (window.attachEvent)
window.attachEvent("onload", initTip)