Results 1 to 10 of 10

Thread: tooltip auto hide

  1. #1
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default tooltip auto hide

    1) Script Title: Cool DHTML Tooltip II

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

    3) Describe problem:

    i tried to use this cool featuer for showing some videos and the problem is that i dont want the balloontip disappear after a certain time. instead i want to be able to add a text/button on the corner of the tooltip/balloontip to let the visitor to close it at any required point.

    thanks for your help

    Adler

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    Normally, you call the hidedrivetip function during the onmouseout event.

    You can actually call the function on any event, and in your case, via onclick.

    For instance, you have something like this:
    Code:
    <a href="http://www.yahoo.com" onMouseover="ddrivetip('Visit Yahoo.com')";
     onMouseout="hideddrivetip()">Search Engine</a>
    ...remove highlighted.

    If you want the tooltip to hide during button's click, then add an onclick event to the button calling hidedrivetip function:
    Code:
    <input type="button" value="Hide Tooltip" onclick="hideddrivetip()">
    Hope that makes sense.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. The Following User Says Thank You to rangana For This Useful Post:

    Adler80 (10-03-2008)

  4. #3
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Thank you Rangana,

    I have tried it and it stoped it from hiding automatically but the problem now is, i want it to hide when i click on the close button/text in the tooltip. but now it only hides when i click on the link which opens the tooltip when i move my mouse over it. so where can i define that?

    cheers man,

    keep up te good job
    Adler

  5. #4
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Rangana man,

    I have worked around with it and figured it out. I looks just perfect and works great now.

    Thank you a million. You are a hero

    Adler

  6. #5
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    hey back again.

    i just came across something funny which i haven't thought of regarding that tooltip i made working perfectly with your help. the fact is that i embeded some videos in the tooltip and it's ok if no one watches the vidoe or watches it till the end. but if one wants to close it half way through, since the close button only "hides" the tooltip so the video keeps playing after the tooltip is closed. and by moving the mouse over the link again, one can find that it's been continuing. can i add some function or something that says, by clicking the close button (or when the tooltip is being hidden) then it refreshes the content of it somehow? that would stop the video i guess.

    thank you,

    Adler

  7. #6
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    If you want to refresh the page during onclick, then you can add location.reload() in the code.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  8. #7
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    thanks dude,

    is there anything else that you can think of that i can use so that when i hide the tooltip by pressing the close button it stops the video too?

  9. #8
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    Well, if this is the best option I have, then how can I make it in a way that it only refreshes the page/tooltip content after the hide function is executed by clicking the close button?

    You know, I'm quite a beginner
    Thanks
    A

  10. #9
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    I could only think of AJAX, but it is not my forte, so I could not be of any further help beyond this point, my apologies.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  11. The Following User Says Thank You to rangana For This Useful Post:

    Adler80 (10-07-2008)

  12. #10
    Join Date
    Sep 2008
    Posts
    36
    Thanks
    15
    Thanked 0 Times in 0 Posts

    Default

    well, thanks man. i figured that out by combining that function you gave me with the function that hides the bos. it's all good.

    appreciate your assistance

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
  •