OK, first off there is an error in IE 7. I'm not sure why and it isn't happening on the demo page but, none of the obvious candidates (DOCTYPE, other scripts, the 'undefined' thing, and the previous change we made) are the cause. So, here is a fix - find this part in the code:
Code:
var mouseX, mouseY;
function trackMouse(evt) {
standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
if (tipOn) positionTip(evt);
}
Make it like so:
Code:
var mouseX, mouseY, standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body;
function trackMouse(evt) {
standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body //create reference to common "body" across doctypes
mouseX = (ns5)? evt.pageX: window.event.clientX + standardbody.scrollLeft;
mouseY = (ns5)? evt.pageY: window.event.clientY + standardbody.scrollTop;
if (tipOn) positionTip(evt);
}
Now, about 'undefined'. If you are using pictures only (no text with them in the tip), you still need an empty string in the arrays to represent 'no text', like so:
Code:
messages[0] = new Array('../images/ODMA4popup.gif', '');
messages[1] = new Array('../images/Patents4popup.jpg', '');
messages[2] = new Array('../images/HQ4popup.jpg', '');
messages[3] = new Array('../images/TW4popup.jpg', '');
messages[4] = new Array('../images/UK4popup.jpg', '');
messages[5] = new Array('../images/MAL4popup.jpg', '');
messages[6] = new Array('../images/WN4popup.jpg', '');
About customizing the widths of each individual tip. Once you start doing it for one, it must be done for all. Here is an example:
Code:
<a href="../Technology/basics.shtml" onmouseover="tipcss.width='375px';doTooltip(event,0)" onmouseout="hideTip()">ODMA</a>
One last thing, I think that you would be better off with the default settings here:
Code:
var offX= 0; // how far from mouse to show tip
var offY= -15;
That would be:
Code:
var offX= 20; // how far from mouse to show tip
var offY= 12;
Bookmarks