PDA

View Full Version : Resolved using default color in Cool DHTML Tooltip



joon
01-13-2009, 01:09 AM
1) Script Title: Cool DHTML Tooltip

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip.htm

3) Describe problem:


code1

<a href="http://yahoo.com" onMouseover="ddrivetip('Yahoo\'s Site', 'lightYellow', 250)";
onMouseout="hideddrivetip()">Yahoo</a>

There are two customizations, i.e, lightYellow and 250.
We can change the color and width.

I like to use the color default and width customized.

So I tried to modify the code1 above like the following.


code2

<a href="http://yahoo.com" onMouseover="ddrivetip('Yahoo\'s Site', 250)";
onMouseout="hideddrivetip()">Yahoo</a>But the code2 above shows the color blue instead of the color lightYellow(default).

which part should I modify for showing default color(lightYellow) WITHOUT color desinating - 'lightYellow', 250) - each ?

Nile
01-13-2009, 01:22 AM
Change:


function ddrivetip(thetext, thecolor, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

To:


function ddrivetip(thetext, thewidth){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor='lightYellow';
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

joon
01-13-2009, 04:01 AM
Thank you very much.

Nile
01-13-2009, 04:04 AM
I'm glad to help anytime Joon.
It seems your topic is solved... Please set the status to resolved.. To do this:
Go to your first post ->
Edit your first post ->
Click "Go Advanced" ->
Then in the drop down next to the title, select "RESOLVED"