One status bar for multiple windows
Takeaway: With JavaScript, you can display the status messages of links in one window in the status bar of another. Here's how.
By Brent Lee Metcalfe
It's possible to display the status messages of links in one window in the status bar of another. Omitting a subwindow's status bar conserves desktop real estate. Having all status prompts display in the primary browser's status bar creates a consistent user experience. Whatever you do, don't mix and match where the status prompts appear.
Notice that when you place your cursor over the x, y, and z graphics, the prompt message is displayed in the status bar of the primary browser window. Furthermore, the message strings and associated display functions reside in the HTML file that opened the new window:
var prompt = new Array('X','Y','Z');
function msgStat(prompt) {
function eraser() {
onMouseOver and onMouseOut event handlers call the functions. For example, this is the code for faux link z:
<a href="javascript:void(0)" onMouseOver="opener.msgStat(opener.prompt[2]); return true" onMouseOut="opener.eraser(); return true"><img src="Images/z.jpg" border="0"></a>
The status prompt functions (msgStat() and eraser()) are accessed from the subwindow via its opener. In msgStat(), the link-specific variable (prompt) is passed as an argument to the function. Because variable prompt is an array of strings ("X", "Y", and "Z") you must include the [] operator to access the array elements. Note that in our example prompt[2] is also accessed via the opener.
Remember, if your site design severs the window object connection, status bar prompts that point to variables in the main browser HTML file won't work.
Brent Lee Metcalfe is a Web architecture consultant.
window.status = 'Status for faux link ' + prompt + ' !';
}
window.status = '';
}
SponsoredWhite Papers, Webcasts, and Downloads
- Opening the Door to VoIP--and More Effective Phone Communications ShoreTel
- IP Telephony from A to Z: The Complete IP Telephony eBook ShoreTel
- PS Series Groups: Deploying Microsoft SQL Server in an iSCSI SAN Dell EqualLogic
- Live Webcast: Simplified IT with Software-as-a-Service (SaaS) ZDNet
- ShoreTel Ergonomic Phones ShoreTel
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET
