Make your own free website on Tripod.com

[an error occurred while processing this directive]

Site Menu

HTML
Learn all about HTML, how to format text, add images, create tables, meta taga, and more!
.
JavaScript
Get the low down on JavaScript. See how to create popular JavaScript applications like drop down menus, clocks, dynamic messages, popup boxes, and more.
.
CGI
Concise, easy to follow introdction to CGI and how to install CGI scripts.
.
Web Design
A miscellanous section that includes various web design tutorials

 

123 Web Design!

Status bar messages

Using JavaScript, you can display messages in the status bar of your browser below. This is accomplished by setting a string value to the "window.status" property. For example:

<script>
window.status="Welcome to my homepage"
</script>

By doing the above, the message "Welcome to my homepage" is shown in the status bar. One trick you may have seen on the web is a status bar message that is initiated only when the user moves her mouse over a link:

Yahoo

Here's the code used:

<a href="http://www.yahoo.com" onMouseover="window.status='Click here for Yahoo!';return true" onMouseout="window.status=''">Yahoo</a>

I captured the mouse's "position" by using the onMouseover and onMouseout event handlers of JavaScript. Event handlers are added directly inside certain HTML tags such as the <a> tag, and allows you to run code that react to a certain event (such as when the mouse moves over a link). In this case, the code displays "Click here for Yahoo!" in the status bar when the surfer moves her mouse over the link "Yahoo", and resets the status bar when the mouse moves out. Pretty cool, uh?