Click here to Skip to main content
Licence 
First Posted 4 Nov 2001
Views 101,256
Bookmarked 33 times

Using JavaScript to write to the status bar

By Andy Scott | 4 Nov 2001
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.
2 votes, 13.3%
1
1 vote, 6.7%
2
4 votes, 26.7%
3
6 votes, 40.0%
4
2 votes, 13.3%
5
3.19/5 - 19 votes
μ 3.13, σa 2.16 [?]

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

Member


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralMy vote of 1 Pinmemberykorotia6:18 6 Dec '08  
GeneralSome Good Resources PinsussAnonymous18:32 19 Aug '05  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120210.1 | Last Updated 5 Nov 2001
Article Copyright 2001 by Andy Scott
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid