Link to home
Start Free TrialLog in
Avatar of walker6o9
walker6o9

asked on

JavaScript tooltip show image

I currently have a tooltip function which displays a gray box and some text.  I also need to add an image next to the text, but I don't know how to do this.  My code for showing the textbox.
function tt_Show()
{
	var css = tt_aElt[0].style;
 
	// Override the z-index of the topmost wz_dragdrop.js D&D item
	css.zIndex = Math.max((window.dd && dd.z) ? (dd.z + 2) : 0, 1010);
	if(tt_aV[STICKY] || !tt_aV[FOLLOWMOUSE])
		tt_iState &= ~0x4;
	if(tt_aV[DURATION] > 0)
		tt_tDurt.Timer("tt_HideInit()", tt_aV[DURATION], true);
	tt_ExtCallFncs(0, "Show")
	css.visibility = "visible";
	tt_iState |= 0x2;
	if(tt_aV[FADEIN])
		tt_Fade(0, 0, tt_aV[OPACITY], Math.round(tt_aV[FADEIN] / tt_aV[FADEINTERVAL]));
	tt_ShowIfrm();
}
function tt_ShowIfrm()
{
	if(tt_ie56)
	{
		var ifrm = tt_aElt[tt_aElt.length - 1];
		if(ifrm)
		{
			var css = ifrm.style;
			css.zIndex = tt_aElt[0].style.zIndex - 1;
			css.display = "block";
		}
	}
}

Open in new window

Avatar of Cem Türk
Cem Türk
Flag of Türkiye image

code you have shown above is not enough to come with a solution...  maybe following will help you http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm
ASKER CERTIFIED SOLUTION
Avatar of Lolly-Ink
Lolly-Ink
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Loganathan Natarajan