View Full Version : tooltip auto hide
Adler80
10-02-2008, 11:20 PM
1) Script Title: Cool DHTML Tooltip II
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/dhtmltooltip2.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
rangana
10-03-2008, 03:01 AM
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:
<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:
<input type="button" value="Hide Tooltip" onclick="hideddrivetip()">
Hope that makes sense.
Adler80
10-03-2008, 11:05 AM
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
Adler80
10-03-2008, 12:15 PM
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
Adler80
10-03-2008, 06:01 PM
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
rangana
10-06-2008, 04:05 AM
If you want to refresh the page during onclick, then you can add location.reload() in the code.
Adler80
10-06-2008, 06:42 AM
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?
Adler80
10-06-2008, 06:58 AM
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 :D
Thanks
A
rangana
10-07-2008, 12:17 AM
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.
Adler80
10-07-2008, 04:20 PM
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
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.