Home arrow JavaScript arrow Page 2 - How to Use the Dojo Tooltip Widget
JAVASCRIPT

How to Use the Dojo Tooltip Widget


Windows uses tooltips; they're also commonly found on web pages. This article shows you how to use dojo to render tooltips with some very useful and unusual effects.

Author Info:
By: Jayaram Krishnaswamy
Rating: 3 stars3 stars3 stars3 stars3 stars / 16
January 23, 2007
TABLE OF CONTENTS:
  1. · How to Use the Dojo Tooltip Widget
  2. · Tooltip in HTML
  3. · Creating a tooltip for objects
  4. · Getting some color into the tooltip
  5. · How about an image in the tooltip?
  6. · The default style of dojoType tooltip
  7. · Creating a tooltip dynamically

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
How to Use the Dojo Tooltip Widget - Tooltip in HTML
(Page 2 of 7 )

Here are a few examples from some of the current web page sources that use the title attribute of HTML. They are mostly used in the title attribute of some structural elements, more often for hyperlinks. When used in the context of a link's attribute they can reference an external style sheet. Please refer to HTML's DTD document at W3C. A related attribute of an image, ALT, also pops up a window describing the image. While it does so in many browsers, the idea of using ALT was to display a textual description of the image when the image could not be loaded or found for some reason. This is mostly neglected in most browsers, and shows the image and the alt message at the same time. Since HTML is very forgiving, authors have a free ride.

<a title="Play" href="#top" onClick="startRotateContent()">

<input type="text" maxlength="75" class="home-searchbox" 
id="question_box" name="question_box" value="" alt="Question or phrase to search."
title="Get answers fast. Type in a question or phrase.">

Tooltips in dojo

Please refer to the previous article on how to work with dojo and how to reference the external script files that are part of the dojo download. The JavaScript for tooltips is found in the Tooltip.js file as shown.

and the file location on the drive is at [C:\inetpub\wwwroot\DojoAjax\widget\Tooltip.js]. Tooltip style properties are defined in the CSS file at: C:\inetpub\wwwroot\DojoAjax\src\widget\templates\TooltipTemplate.css.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Tutorials for Beginners
- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 10 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials