Results 1 to 4 of 4

Thread: using default color in Cool DHTML Tooltip

  1. #1
    Join Date
    Apr 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default using default color in Cool DHTML Tooltip

    1) Script Title: Cool DHTML Tooltip

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tmltooltip.htm

    3) Describe problem:

    Code:
    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.

    Code:
    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 ?
    Last edited by joon; 01-13-2009 at 04:01 AM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Change:
    Code:
    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:
    Code:
    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
    }
    }
    Jeremy | jfein.net

  3. #3
    Join Date
    Apr 2005
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much.

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    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"
    Jeremy | jfein.net

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •