1) Script Title:
Rich HTML Balloon Tooltip
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamici...oontooltip.htm
3) Describe problem:
Hi,
On my site http://www.ebav.co.uk/travian/ everything seems to work fine in Firefox. However in IE7 when I try and view a tooltip using your script it seems to fail with the following message:
Line 64
Char 1
Error Object doesn't support this property or method
Code 0
File index.html
and again...
Line 1
Char 1
Error 'dropmenuobj' is undefined
Code 0
File index.html
I have made the following changes to the file (basically so I could get multiple onmouseovers):
This code has been changed ...
to this ...Code:function initalizetooltip(){ var all_links=document.getElementsByTagName("a") if (enablearrowhead){ tiparrow=document.createElement("img") tiparrow.setAttribute("src", arrowheadimg[0]) tiparrow.setAttribute("id", "arrowhead") document.body.appendChild(tiparrow) } for (var i=0; i<all_links.length; i++){ if (reltoelement(all_links[i])){ //if link has "rel" defined and it's the ID of an element on page all_links[i].onmouseover=function(e){ var evtobj=window.event? window.event : e displayballoontip(this, evtobj) } all_links[i].onmouseout=delayhidemenu } } }
Nothing else has been changed except for the directory the arrow images sit in.Code:function initalizetooltip(){ var all_links=document.getElementsByTagName("area") if (enablearrowhead){ tiparrow=document.createElement("img") tiparrow.setAttribute("src", arrowheadimg[0]) tiparrow.setAttribute("id", "arrowhead") document.body.appendChild(tiparrow) } for (var i=0; i<all_links.length; i++){ if (reltoelement(all_links[i])){ //if link has "rel" defined and it's the ID of an element on page function balloontipdoit(e){ var evtobj=window.event? window.event : e displayballoontip(this, evtobj) } if (window.addEventListener) all_links[i].addEventListener("mouseover", balloontipdoit, false) else if (window.attachEvent) all_links[i].attachEvent("onmouseover", balloontipdoit) if (window.addEventListener) all_links[i].addEventListener("mouseout", delayhidemenu, false) else if (window.attachEvent) all_links[i].attachEvent("onmouseout", delayhidemenu) } } }
Thanks for your help!
James



Reply With Quote

Bookmarks