PDA

View Full Version : DHTML Tooltip Help



Master_script_maker
12-28-2007, 02:35 PM
1) Script Title: Cool DHTML Tooltip
Resolved
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm

3) Describe problem:
Internet explorer alerts that tipobj.style is null or not an object (I have not tested it in other browsers). Here is the code in question:

if (rightedge<tipobj.offsetWidth)
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=ie? ietruebody().scrollLeft+event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset+e.clientX-tipobj.offsetWidth+"px"
else if (curX<leftedge)
tipobj.style.left="5px"
else
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetxpoint+"px"

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight)
tipobj.style.top=ie? ietruebody().scrollTop+event.clientY-tipobj.offsetHeight-offsetypoint+"px" : window.pageYOffset+e.clientY-tipobj.offsetHeight-offsetypoint+"px"
else
tipobj.style.top=curY+offsetypoint+"px"
tipobj.style.visibility="visible"

ddadmin
12-29-2007, 01:16 AM
Hmm we need more info (the snippet above doesn't really provide any insight). Do you have a link to the problem page we can look at?

Master_script_maker
12-29-2007, 01:24 AM
recopied the code, works fine now.
Thanks anyway.
__________________
Have you seen my [DHTML] Collapsable Div with limit and groups (http://www.dynamicdrive.com/forums/showthread.php?t=27836)