Example 2: Enhanced Tooltip

In the second example, the basic tooltip is enhanced in two ways. For the left link below, we add text to the browser's status bar while we are flying over the link. We do this by adding the 'status' option to the domTT_activate() function.* For the right link, we constantly update the tooltip position so that it stays with the mouse while we are over the link by registering domTT_active().**

Tooltip with Status Text | Tooltip that constantly updates position

* In order to get the status bar text to override the browser default when using domTT_activate() on a link tag, you must wrap the event call in return makeTrue() so that it intercepts this default from occuring (the default is to show the href of the link). This is NOT necessary for any other tag, such as a span or div tag. Setting the status bar text does not work in Opera 7.

** No matter what we do, the onmousemove event cannot write the status text when DOM Tooltip is used on a link tag. Therefore, when using the onmousemove event handler on link tags, you must also use the onmouseover event to write the status text (but only pass in the 'status' option to the onmouseover event or else you will end up with two tooltips).

Note: When creating a tip, you cannot use onmouseover and onmousemove (unless it is to avoid the pitfall mentioned. Doing so will give you one or the other, but not both tooltips.

Note: The mousemove event triggers very slowly in mozilla when using a slower computer, so this constant update is not always very smooth. This is a limitation of mozilla.

«Example 1
Example 3»