Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Everett James   on Apr 04 In Java Category.

  
Question Answered By: Saxon Anderson   on Apr 04

I can help you with javascript code for it :


if (!document.layers&&!document.all&&!document.getElementById)
event="test";
function showtip(current,e,text) {

if (document.all||document.getElementById) {
thetitle=text.split('<br>');
if (thetitle.length>1) {
thetitles='';
for (i=0;i<thetitle.length;i++)
thetitles+=thetitle[i];
current.title=thetitles;
}
else
current.title=text;
}

else if (document.layers) {
document.tooltip.document.write('<layer bgColor="yellow" style="border:1px;font-size:18px;font-family: nazli;font-color: #0f1c5e;">'+text+'</layer>');
document.tooltip.document.close();
document.tooltip.left=e.pageX+5;
document.tooltip.top=e.pageY+5;
document.tooltip.visibility="show";

}
}
function hidetip(){
if (document.layers)
document.tooltip.visibility="hidden";
}

and it's use is :

<a href="#" onmouseout="hidetip();" onmouseover="showtip(this,event,'text to show');">Sample</a>

you could use it in your iterator for JList.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on set ToolTip to each item of JList? Or get search suggestion and latest updates.


Tagged: