JavaScript

Home     Next

Notes from the ZDU JavaScript Workshop, and elsewhere.

Status Bar Message Rollovers

Note IE3.0 does not support swapping images.

Hypertext link jump to nowhere

To make a hypertext link jump to nowhere without generating an HTML error, set a tag's HREF attribute to javascript:void(0). (Another way would be to use "#" in the anchor. In a real Web page, you would set HREF to your desired URLs.)  e.g.

 <!-- Links button -->
<A HREF="javascript:void(0)">
<IMG SRC="images/link.gif" NAME="linkImg" BORDER="0"></A>&nbsp;

image of Links button 

<A HREF="javascript:void(0)">Favourite Links</A><BR> 

Favourite Links

Message that appears when mouse is moved over button or link, and stays

To create a message that appears when you place your cursor over the toolbar buttons and the text links, and does not disappear when you move your mouse away, add a JavaScript onMouseOver event handler to the tag.  e.g.

 <!-- Home button -->
<A HREF="javascript:void(0)"
onMouseOver="window.status='Home Base'; return true">
<IMG SRC="images/home.gif" NAME="homeImg" BORDER="0"></A>&nbsp;

Image of Home button  

<A HREF="javascript:void(0)"
onMouseOver="window.status='Find your way back home.'; return true">
Home Base</A><BR>


Home Base

Back to top     Next     Home     Serious Stuff

© 2001. Copyright Sue Nethercott.