Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please advice....tool tip problem

Status
Not open for further replies.

McogEsteban

Programmer
Oct 2, 2003
5
0
0
PT
hi everyboy, i have this strange problem:
this script erads values from a xml file, i'm creating a table with links and for each link i add a tool tip (onMouseOver,onMoseOut), the problem is that i see the same tool tip for every link, why is this happening?
example:
<link>
<name><description>xpto</description>
</link>
<link>
<name><description>zbrrrrr</description>
</link>

in the table when i move the mouse over the links i see the same tool tip for link xpto and zbrrrrr.
what i'm doing wrong?
thanks.

for(i=1;i<=step;i++)
{
((i%2) == 0) ? bcolor=&quot;#aa9000&quot;:bcolor=&quot;#bb7000&quot;;
desc = xmlObj.childNodes.childNodes[1].firstChild.text;

document.write('<td bgcolor=' + bcolor + '><a href=&quot;#&quot; onMouseOver=popup(desc,cor); onMouseOut=kill()><p align=center>' + xmlObj.childNodes.childNodes[1].firstChild.text + '</a></td>');

}
 
Can you show us this function and it's values:

popup(desc,cor)

What do the variables &quot;desc&quot; and &quot;cor&quot; represent?

2b||!2b
 
You might be able to just use built in tooltips rather than simulating them with mouseover/out:

Code:
document.write('<td bgcolor=' + bcolor + '><a href=&quot;#&quot; title=&quot;' + desc + '&quot;><p align=center>' + xmlObj.childNodes[i].childNodes[1].firstChild.text + '</a></td>');

you also probably want to include what's in desc rather than just the word 'desc' :)

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top