Home arrow JavaScript arrow Page 4 - 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 - Getting some color into the tooltip
(Page 4 of 7 )

Perhaps what you saw in the previous example is similar to what can be achieved by HTML's title attribute. But this is not all. Dojo can do a lot more. This next snippet can pop open a whole HTMLl file by using the dojoTooltip's other attributes. The dojoType tooltip gets connected to the object through its id property as in the previous example.

<!--Button-->
<input type=text id="myBox" value="This box">
<span dojoType="tooltip" 
connectId="myBox" 
href="http://localhost/DojoAjax/tooldoc2.htm"
executeScripts="true" </span> <!--end button-->

Just plug in the previous snippet between the comment that reads <!--Button- -> .....<!--end button-->. When you open the page in browser you will see the following display.

Of course you need to have this tooldoc2.htm in the root directory whose source code is shown here. While both HTML attributes as well as inline CSS work, linked style does not get rendered.

<HTML> 
<HEAD> 
<TITLE>Tooldoc2 htm file </TITLE>
</HEAD> 
<BODY> 
<h2 style="color:magenta;
font-weight:bold; 
background-color:yellow;
width:80px;">Test</h2>
<h3><font color="blue">Test again</font></h3>
</body>
</html>


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 2 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials