Tooltip?

liunx

Guest
Is there an attribute that creates a tooltip for a hyperlink, or would I have to use javascript?<br />
<br />
If jaavascript, then how?<!--content-->yes you have to use javascript<br />
<br />
<!-- m --><a class="postlink" href="http://www.snippetlibrary.com/code.php?id=5&kid=22&catname=OnMouseover">http://www.snippetlibrary.com/code.php? ... nMouseover</a><!-- m --><!--content-->the best if not the only is with javascript. How you do it depends how you want the end result to be if you want one like at the top of this page look at the scource code see how it is done and do it if not <!-- m --><a class="postlink" href="http://www.dynamicdrive.com/dynamicindex5/index.html">http://www.dynamicdrive.com/dynamicindex5/index.html</a><!-- m --> is a good start<br />
<br />
Bonkom :pimp:<!--content-->sorry to waste your time guys.<br />
<br />
I have found that the "Title" attribute can also act as a tooltip in the newer versions of IE.<br />
<br />
Thanks for the Javascript refs, though. Will be useful for when we do public sites too.<!--content-->well yeah but that is if you are strictly doing IE applications, as the title won't work in NS. also I think I read that the title attrib is being deprecated. which means it might not be around for very long.<!--content-->Sorry, but I gotta disagree. You don't have to use JS for a tool tip on a hyperlink or any other textual content.<br />
<br />
<a href=http://www.htmlforums.com/archive/index.php/"link.htm" title="This is a tool tip">Tool Tip Test</a><br />
<br />
This works for any browser and/or tag that supports it. As with JS it is browser dependent.<br />
<br />
<a>, <span>, <div>, <img>, <p>, and many more I'm sure.<!--content-->yes you do if you want it cross-browser.<br />
<br />
the title attrib is deprecated and NS doesn't work with it.<!--content-->is the title attribute really deprecated?<br />
<br />
because i have seen that it is really useful when using the <ABBR>..</ABBR> and <ACRONYM>..</ACRONYM> tags.<!--content-->well it doesn't appear to be anymore. could have sworn that I read it was. so the title attrib is not deprecated. but I still wouldn't use it.<!--content-->I have read at my main reference site:<br />
<br />
<!-- m --><a class="postlink" href="http://www.htmlhelp.com/reference/html40/">http://www.htmlhelp.com/reference/html40/</a><!-- m --> <br />
<br />
that, while the title attribute can be useful (especially in the examples above) it is not recognised by most browsers.<!--content-->I wasn't trying to be a "know-it-all", but I've tested the title attribute on IE, NS6, Mozilla, and Opera, and they all support it.<br />
<br />
I found this on the W3C:<br />
<!-- m --><a class="postlink" href="http://www.w3.org/TR/html401/struct/links.html#h-12.1.4">http://www.w3.org/TR/html401/struct/links.html#h-12.1.4</a><!-- m --><br />
<br />
12.1.4 Link titles<br />
The title attribute may be set for both A and LINK to add information about the nature of a link. This information may be spoken by a user agent, rendered as a tool tip, cause a change in cursor image, etc.<br />
<br />
Thus, we may augment a previous example by supplying a title for each link:<br />
<br />
<BODY><br />
...some text...<br />
<P>You'll find a lot more in <A href=http://www.htmlforums.com/archive/index.php/"chapter2.html"<br />
title="Go to chapter two">chapter two</A>.<br />
<A href=http://www.htmlforums.com/archive/index.php/"./chapter2.html"<br />
title="Get chapter two.">chapter two</A>. <br />
See also this <A href=http://www.htmlforums.com/archive/index.php/"../images/forest.gif"<br />
title="GIF image of enchanted forest">map of<br />
the enchanted forest.</A><br />
</BODY><!--content-->
 
Back
Top