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:
[color blue]
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 [/color]
You can set attributes for both browsers at once, they will ignore ones they don't understand
e.g.[color red]
var newOne = self.open('myWin.htm','Mine','menubar=no,titlebar=no') [/color]
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.
[color red] opener.close() [/color]
This would close the window which opened our new one.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.