Webmaster webtools build better websites! Webmaster affiliate programs make more free cash profits!
Start Right Here
Internet Business
FREE ClipArt
Web Programming
Website Advertising

Java Script
CGI and Perl
HTML and XML
Database Info
Dynamic HTML

| Prime Webtools | Java Scripts | Pop-Up Windows | Window Methods |
 


Opening New Windows with Java Script


Java script allows for much more control and options for opening windows than html. You can control the contents of the window , the window size (height & width properties); the position on the browser screen; and whether or not the nw window will have toolbars (and which ones), a menu bar, and a status bar.

New windows created using the TARGET property will draw their appearance (toolbars, menu bars, scroll bars, etc.) from the apperance of the main browser window.

Creating new windows with Java Script
Use the command
window.open("Your URL", "WindowName","FeatureList")

Your URL = is the url of the page to be displayed in the window
Window Name = is the target name assigned to the window..You use this name to call the window.
FeatureList = Include all the features from the list below that you want to use.

Controlling Pop-up Window Features

To define the width and height of the pop-up window, add the following in the features list in the
window.open()method:
"width=x, height="y"
where x and y are the width and height of the window, in pixels.

To set the screen position of the pop-up, add the feature:
"left=x, top="y"
where x is the coordinate of the left edge and y is the coordinate of the window's top edge.
in pixels

To display the directory buttons, location box, menu bar, scroll bar, status bar, or toolbar, add the features:

"directories=value, location=value, menubar=value, scrollbars=value, status=value, toolbar=value"
where value is either "yes" (to show) or "no" ( to hide) You can also use the value "1" for yes "0" for no

testing popup window

 
         
Features List
Available in the WINDOW.OPEN
( ) Method
  Object Dynamic Window Feature Description VALUES Netscape
I E
           
  directories Displays directory buttons yes/no 2.0 3.0
  fullscreen Displays the window in fullscreen mode yes/no   3.0
  height Sets the height of the window in pixels number 2.0 3.0
  width Sets the width of the window in pixels number 2.0 3.0
  left Sets the left edge, in pixel, of the window relative to the left edge of the screen number 4.0 3.0
  top Sets the top edge, in pixels, of the window relative to the top edge of the screen number 4.0 3.0
  menubar Displays the window's menu bar yes/no 2.0 3.0
  resizable Allows the user to resize the window
(always available on Mac)
yes/no 2.0 3.0
  scrollbars Displays scroll bars in the window yes/no 2.0 3.0
  status Displays the window's status bar yes/no 2.0 3.0
  toolbar Displays the window's status bar yes/no 2.0 3.0
  location Displays the location box yes/no 2.0 3.0
   
  alwaysLowered Displays the window behind all other windows; signed script required yes/no 4.0  
  outerheight Sets the height of the window, including the chrome; signed script required for small values number 4.0  
  innerwidth Sets the width of the window, including the chrome; signed script required for small values number 4.0  
  innerheight Sets the height of the page in the document window, excluding the chrome; signed script required for small values number 4.0  
  innerwidth Sets the width of the page in the document window, excluding the chrome; signed script required for small values      
  alwaysRaised Displays the window on top of all other windows; signed script required yes/no 4.0  
  dependent Window closes when the parent window closes yes/no 4.0  
  screenX Sets the left edge, in pixels, of the window relative to the left edge of the screen; signed script required to move window offscreen number 4.0  
  screenY Sets the Top edge, in pixels, of the window relative to the left edge of the screen; signed script required to move window offscreen number 4.0  
  titlebar Specifies if the title bar is visible on the new window; signed script required yes/no 4.0  
  z-lock Fixes the window below other browser windows; signed script required yes/no 4.0  
           

 

 

Free CGI Scripts - Increase website traffic
Reciprocal Links
Linkscout Search & Promotion System!
       
       
Back to Top > Home Page > Contact Us ?  
CopyRight© Internet Venture Portals™ 1999-2004 All Rights Reserved
This website is protected by International Copyright Laws and is timestamped by independant legal sources.
Any copying of this website's design, consept or syntax will be followed up and punished to the fullest extent of local and international laws.