Wrox Programmer Forums
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2006, 05:51 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default tooltip interval???

Hi all,
How shall I change the hovering interval of the tooltip (or prevent it to hide) which appears when you hold the mouse pointer over an object to which a title attribute is assigned?

 
Old July 12th, 2006, 06:07 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As far as I know, tooltip display is completely browser / operating system controlled. What most sites do instead is to use DHTML to mimic the behavior of a tooltip, allowing them to provide very rich tooltips containing structured data and images. Doing this will also allow you to modify the hovering interval.

This site has a simple example: http://www.walterzorn.com/tooltip/tooltip_e.htm ... but I've never used their code personally so take the link for what it's worth :).

Jon Emerson
http://www.jonemerson.net/
 
Old July 12th, 2006, 12:57 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Also, they don't go away if you keep your mouse pointer still. :)

--
http://yupapa.com
 
Old July 13th, 2006, 09:44 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 212
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Would this work? (A bit primitive) - Use an onmouseover event that triggers possibly a blur() or focus() after an interval (obviously allow the user enough time to read the tooltip). Like this:

<a href = "http://www.somewhere.com" title = "This goes somewhere" onmouseover = "removeTitle(10000)">Somewhere</a>
<input type = "hidden" id = "hField">


<script language = "javascript">
function removeTitle(readTitle)
{
window.setTimeout(document.getElementById('hField' ).focus(), readTitle)
}
</script>

Don't know if it will work, just a thought. You could also trigger a tab with sendKeys in VBScript but I think the tooltip would reappear unless the tab took them out of the viewing area they are in. may be the same with focus(), but worth a shot.

HTH!
Joe

'sync' <cr>
The name specified is not recognized as an internal or external command, operable program or batch file.
 
Old July 22nd, 2006, 03:29 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Meow, be sure it WILL dispear with the mouse pointer still (at least in windows).
and Interupt, I guess the input field is irrelevant.

Just suppose you have tones of pages (and UI components used in those pages) in hand (and of course having this defect) and suddenly your employer comes and tells you the interval is too little to read the whole stuff and asks to do something about it...
I don't want to replace the simple 'title' attribute with any new DHTML technique in all this pages nor do I want to extened those encapsulated UI components.

what would u do?!

Does anyone know anything about manipulating this interval in windows at least(since it seems it's more related to the OS than the browser).

 
Old August 4th, 2006, 12:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

No, they won't. Not in IE, not in Opera and not in FF. Put your pointer on something with a tooltip, remove your hand and let the mouse lie there and you'll see. :)

I think you have to create your own tooltips if you want them to be more easy to read. It's easy enough with CSS, but since IE only accepts :hover on links you may want to look for a JavaScript solution instead.


--
http://yupapa.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Help to query for data by 30-mins interval sunny76 Access 2 June 19th, 2008 11:52 AM
how to run code snippet in regular interval Swati Chari Beginning VB 6 2 March 12th, 2008 03:07 PM
Excel ADO 2.7 problem subindex out of interval xoc Beginning VB 6 1 April 15th, 2007 03:35 PM
How to select a time that is within a interval? kuzze MySQL 2 August 23rd, 2004 06:33 AM
A date interval with a date interval query spinto SQL Server 2000 7 May 15th, 2004 04:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.