Skip to Content
JavaScript: The Definitive Guide, Fourth Edition
book

JavaScript: The Definitive Guide, Fourth Edition

by David Flanagan
November 2001
Intermediate to advanced
936 pages
68h 43m
English
O'Reilly Media, Inc.
Content preview from JavaScript: The Definitive Guide, Fourth Edition

The Status Line

Web browsers typically display a status line at the bottom of every window (except for those explicitly created without one), where the browser can display messages to the user. When the user moves the mouse over a hypertext link, for example, the browser usually displays the URL to which the link points. And when the user moves the mouse over a browser control button, the browser may display a simple context help message that explains the purpose of the button. You can also make use of this status line in your own programs. Its contents are controlled by two properties of the Window object: status and defaultStatus.

Although web browsers usually display the URL of a hypertext link when the user passes the mouse pointer over the link, you may have encountered some links that don’t behave this way -- links that display some text other than the link’s URL. This effect is achieved with the status property of the Window object and the onmouseover event handler of hypertext links:

<!-- Here's how you set the status line in a hyperlink. -- Note that the event handler *must* return true for this to work. --> Lost? Dazed and confused? Visit the <a href="sitemap.html" onmouseover="status='Go to Site Map'; return true;"> Site Map </a> <!-- You can do the same thing for client-side image maps --> <img src="images/imgmap1.gif" usemap="#map1"> <map name="map1"> <area coords="0,0,50,20" href="info.html" onmouseover="status='Visit our Information Center'; return true;"> <area ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

JavaScript: A Beginner's Guide, Fourth Edition, 4th Edition

John Pollock
JavaScript Cookbook, 3rd Edition

JavaScript Cookbook, 3rd Edition

Adam D. Scott, Matthew MacDonald, Shelley Powers

Publisher Resources

ISBN: 0596000480Supplemental ContentCatalog PageErrata