window.status is deprecated. Modern browsers generally do not let ordinary page scripts replace the destination/status text users rely on. This page is kept for historical learning and to explain why older examples behave differently today.The original tutorial used mouseover and mouseout on links to try to replace status-bar text. Both demonstrations are retained below.
const link = document.getElementById("homeLink");
link.addEventListener("mouseover", () => { window.status = "Welcome to Plus2net.com Home page"; });
link.addEventListener("mouseout", () => { window.status = "Enjoy reading JavaScript tutorials"; });The next link still goes to Plus2net, exactly as the original facility did. The script attempts to show a Google URL in window.status. Modern browsers are expected to ignore or tightly control this behavior, which protects users from destination spoofing.
const link = document.getElementById("misleadingLink");
link.addEventListener("mouseover", () => { window.status = "https://www.google.com"; });
link.addEventListener("mouseout", () => { window.status = ""; });If you need to display contextual help, place it in the document where users can reliably see it instead of trying to control browser chrome.
const help = document.getElementById("linkHelp");
const link = document.getElementById("docsLink");
link.addEventListener("focus", () => { help.textContent = "Opens the JavaScript documentation page"; });
link.addEventListener("blur", () => { help.textContent = ""; });Older versions of this tutorial instructed readers to change dom.disable_window_status_change in about:config. That browser-configuration instruction is retained here as historical context, but it is not recommended as part of modern web development. A page should not depend on users changing internal browser preferences.
Window Object Bookmark a page Alert Window
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
| Mark | 01-03-2012 |
| It does not work in my IE9 and Win7. The samples above show the real links in my status bar. | |