CFToolTip in CF8 - An Introduction

This past week, I decided to try using the Coldfusion tag CFTOOLTIP in CF8 for the first time, to show a message to our users.

What this tag does is generate a tool tip when the user hovers over the item that is between the CFTOOLTIP tags. Here is an example:

<cftooltip tooltip="Please call us at 555-555-5555 if you are having difficulty">
<img src="/images/question_mark.png" alt="Help" />
</cftooltip>

There are two attributes to this tag to provide the tool tip content. SourceForTooltip allows you to specify a URL with the tool tip contents. The other is ToolTip (which I used in the above example). If you specify a SourceForTooltip, then the ToolTip is ignored. For both of these, you can use HTML in the tags. And I recommend using that to your advantage. I noticed that the tool tip will stretch across the entire page if your contents are long enough to push it that far - I wound up putting my actual content within a div and set the width of the div to a reasonable limit.

Three more attributes of this tag are hideDelay, showDelay and autoDismissDelay. HideDelay specifies the anumber of milliseconds between when the user moves the mouse away and when the tool tip disappears. ShowDelay specifies the number of milliseconds between when the user hovers over the component and when the tool tip disappears. And autoDimissDelay specifies the number of milliseconds between when the user starts hovering over the component and when the tool tip should disappear on its own.

I was having problems getting any of these delay settings to work properly for me. I know other people were having problems with the autoDismissDelay and a bug was reported to Adobe. Although I wasn't actually able to get the other two to work for me either, if they did, it wouldn't do much good until the autoDismissDelay attribute is fixed because that will override the other two if they are set to something more than 5000 ms (the default for autoDismissDelay).

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner