Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Popup Windows: open() Parameters

Until now we've focused on the process of opening and closing the popup window. We'll now shift to the properties of the popup itself. All of the popup's properties are set in the open() command. We've used open() in every script in this tutorial.

Specifically, the properties of the popup are set in the third argument for open() which is a list of properties for the popup. Properties are set somewhat similar to the way HTML attributes are set: the name of the property followed by an equal sign followed by the value. Properties are separated by commas. Because of a widespread bug in MSIE, do not put any spaces in the list of properties. The entire list of properties goes inside quotes. So, for example, the following line of code sets width to 400, height to 200, and turns scrollbars on.

We'll begin with the width & height properties, which are always required except in full screen mode. All other properties are optional. Here's a list of popup properties.
width & height the dimensions of the popup
left & top the distance from the top and left side of the screen
toolbar if the popup should have a set of navigation buttons across the top
location if the popup should have a location bar where the URL is displayed
directories if the popup should have a row across the top with buttons to popular web sites
status if the popup should have a status bar across the bottom
menubar if the popup should have a menu
scrollbars if the popup should have scroll bars
resizable if users can resize the popup
dependent if the popup should close when its opener window closes
full screen how to open a full screen popup
channelmode MSIE's channel mode

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire