About This Code
Brief Description:
Can you give me a hint?
Contributor:
Andrew Jones
Last Modified:
17 Jun 2002
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
To do this we simply add Pass-Thru HTML to the form in the place you want the help to appear. So for the first field from above we use:
Your <acronym title="Personal Identification Number">PIN</acronym> number:
and for the second field where the help is not for an acronym and is more general:
Your <span class="tip" title="The ID you were given when you first called the support line">Support ID</span>:
Notice that the span tag had a class attribute assigned to it but the <accronym> tag did not. This is because we can change the style of all <accronym> tags and assume they are always tips, whereas we only want to do it for <span> tags specified as "tips". All we need do then is add the following CSS definitions to the form. See! I'm using it already ;)
abbr, acronym, .tip {
border-bottom: 1px dotted #00cc33;
cursor: help;
}
This simply tells all <abbr> and <acronym> tags and those tags with a "tip" class assigned that the icon is the help icon and that they are to be underlined with green dots (IE5.5+, OP5+ and NN6+).
Usage / Example
Comments
Posted by John Smart on 08/26/2003 04:30:14 PMTaken from Codestore.
Jake Howlett generally prefers that people don't copy his stuff to other sites. Hopefully he doesn't mind in this case.
[<a href="http://www.codestore.org/store.nsf/unid/DOMM-4ZSMDX">Original article posted 2-Sep-01</a>]