INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Opening and closing a window

Options available for new windows. by GIGN
Posted: 11 Dec 00

Due to high demand for new windows lately I thought people may like a list of the parameters available.

  for window.open('name.htm','windowName','parameters')

All the parameters must be enclosed as a single string with comma's separating them, and no spaces (or they won't work).

They are entered as : parameter=value pairs, these parameters (the ones I know of) are:
 
   dependant=yes/no
   directories=yes/no
   height=pixel value (replaced in 1.2 with inner/outer)
   width=pixel value   (replaced in 1.2 with inner/outer)
   location=yes/no
   hotkeys=yes/no
   innerHeight=pixel value
   innerWidth=pixel value
   menubar=yes/no
   outerHeight=pixel value
   outerWidth=pixel value
   resizable=yes/no
   left=pixel value (NN4+ --> screenX)
   top=pixel value   (NN4+ --> screenY)
   scrollbars=yes/no
   titlebar=yes/no
   toolbar=yes/no
   z-lock=yes/no
   copyhistory=yes/no

You can set attributes for both browsers at once, they will ignore ones they don't understand

 e.g.
var newOne = self.open('myWin.htm','Mine','menubar=no,titlebar=no')  


The 'name' is used only for the target attribute of links and form submissions - so always attach to a variable, to perform any actions on the new window.

When working with new windows, the window which spawned the new one is referred to as the window's opener, not parent.Parent refers to frames pages.

   opener.close()
This would close the window which opened our new one.

Back to Javascript FAQ Index
Back to Javascript Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close