On The Insider: Anne Hathaway Jokes about Ex's Troubles

Open multiple windows

Tags: Guest Contributor

  • Save
  • Print
  • 0

Takeaway: There are times when you'll want to open a second window to display related links or other information. This JavaScript windows tip shows you how.

By Brent Lee Metcalfe

Often, you want to open a second window to display related links or other information to the user. Use the code in this tip to open more than one window simultaneously. This creates a parent/child relationship between the new JavaScript-generated windows and the window that launched them.

Four windows open, each positioned in a corner of your desktop. The new windows close when you click the main browser window.

To create this effect, I defined four windows, each in its own function. Next, I created a function (winBig()) that invokes the four functions that define the respective windows:

function winBig() {
  win1(150,150);
  win2(175,175);
  win3(200,200);
  win4(225,225);
}

You can't define multiple windows in a single function call; it won't work.

Multiwindow UIs can benefit users by conserving desktop real estate and distinguishing between navigation and destination, among other things.

Brent Lee Metcalfe is a Web architecture consultant.

  • Save
  • Print
  • 0

What do you think?

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
advertisement
Click Here