5,427,303 members and growing! (18,693 online)
Email Password   helpLost your password?
Web Development » Client side scripting » Beginners     Beginner

Using JavaScript to write to the status bar

By Andy Scott

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.
JavascriptWin2K, WinXP, Windows, Dev

Posted: 4 Nov 2001
Updated: 4 Nov 2001
Views: 66,356
Bookmarked: 20 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
18 votes for this Article.
Popularity: 4.18 Rating: 3.33 out of 5
1 vote, 7.1%
1
1 vote, 7.1%
2
4 votes, 28.6%
3
6 votes, 42.9%
4
2 votes, 14.3%
5

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



Location: United States United States

Other popular Client side scripting articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 1 of 1 (Total in Forum: 1) (Refresh)FirstPrevNext
Subject  Author Date 
GeneralSome Good ResourcessussAnonymous18:32 19 Aug '05  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 4 Nov 2001
Editor: Nishant Sivakumar
Copyright 2001 by Andy Scott
Everything else Copyright © CodeProject, 1999-2008
Web15 | Advertise on the Code Project