Spread the word

Tuesday, July 8, 2008

How to show a link details in status bar of the browser in JavaScript

Here is another cool trick with JavaScript. Whenever an user mouse overs a linked text or image, you use to show them a tool tip through the title text property of anchor tag. But now you can also show the details of the link in the status bar of the browser. Its very easy and light to show a short description in the browser status bar, whenever an user mouse overs the link text or image. Here is and example of using the onMouseOver and onMouseOut event handlers of JavaScript.



<a href="next.html" onMouseOver="window.status='This codes shows description in the browser status bar';return true" onMouseOut="window.status=''">LINK TEXT</a>

This code will show the text you provide for to show in the status bar of your browser whenever you will put your mouse on the linked text. This works best in Internet Explorer.

0 comments:

Post a Comment