Click here to Skip to main content
Click here to Skip to main content

Using JavaScript to write to the status bar

, 4 Nov 2001
Rate this:
Please Sign up or sign in to vote.
Some of the simpliest effects in JavaScript are also the most useful, in my opinion. One example is using JavaScript to write something to the status bar.

Introduction

Some of the simplest effects in JavaScript are also the most useful, in my opinion. One example is using JavaScript to write something to the status bar. The status bar is a lonely, empty place just waiting for you to take advantage of. You can use it to display a description of the link your mouse is currently over, show some message etc.

To write to the status bar, use the JavaScript function:

<script>
function writetostatus(input){
    window.status=input
    return true
}
</script>

For example, I create a link below that uses this function to a description of the link onmouse over:

<a href="http://www.google.com" onMouseover="writetostatus('Search the web!')"
onMouseout="writetostatus('')">Google</a>

I like this example by Website Abstraction, which gets really creative and "unscrambles" the message into view.

Conclusion

The key to writing to the status is using the property window.status, and remembering to return true if you're adding it to a function.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Andy Scott

United States United States
No Biography provided

Comments and Discussions

 
QuestionIt only works in Opera PinmemberJayme Jeffman11-Feb-14 8:07 
GeneralMy vote of 1 Pinmemberykorotia6-Dec-08 5:18 
GeneralSome Good Resources PinsussAnonymous19-Aug-05 17:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 5 Nov 2001
Article Copyright 2001 by Andy Scott
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid