Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Chris on Aug 01, 2008 09:03
open dhtmlx forum
Tree: icon title

Is there anyway to add a tooltip to an image displayed in a tree?

I am feeding the tree from an XSLT file (attached) which translates XML generated from a .NET DataSet returned by a call to an Oracle Stored Procedure. The Stored Procedure also feeds a grid via another XSLT file. The ITEM_IMAGE field includes the image file name and tooltip text separated by a ^. In the attached XSLT you will see that I am sub-stringing the file name for use in the ‘im0’, ‘im1’ and ‘im2’ attributes of the tree item. I’d like to sub-string the bit of the ITEM_IMAGE field after the ^ and use it to display a tooltip for the image in the tree on a mouseover.

Answer posted by Support on Aug 01, 2008 09:04

You can make changing in the dhtmlxtree.js file - line 667:

Try to replace the following code:

if(image1) n.images[0]=image1; 

with:

if(image1){
  var temp=image1.split("^")
  n.images[0]=temp[0];
  n.span.parentNode.previousSibling.firstChild.title=temp[1];
}