Active Client Pages: DOM Roots of the Window Phase - Can you decide whether a particular bar will be present or absent?
(Page 3 of 5 )
While opening the window, the specs parameter of the open() method is used for deciding whether a particular will be present or absent in the newly-opened window.
The following code will give you a menu bar:
window.open("","","menubar=yes","")
The following code will not give you a menu bar:
window.open("","","menubar=no","")
The following code will give you a tool bar:
window.open("","","toolbar=yes","")
The following code will not give you a tool bar:
window.open("","","toolbar =no","")
The following code will give you an address bar:
window.open("","","location=yes","")
The following code will not give you an address bar:
window.open("","","location=no","")
The following code will give you a title bar:
window.open("","","titlebar=yes","")
The following code will not give you a title bar:
window.open("","","titlebar=no","")
The following code will give you scroll bars:
window.open("","","scrollbars=yes","")
The following code will not give you scroll bars:
window.open("","","scrollbars=no","")
The following code will give you a status bar:
window.open("","","status =yes","")
The following code will not give you a status bar:
window.open("","","status=no","")
The way browsers handle bars
With some browsers, if you remove one bar, all of the other bars except the title bar are also removed. With such behavior, if you want a particular bar, you have to include it in the specs parameter.
Next: What about the words child, grandchild, descendant, parent, grandparent and ancestor? >>
More JavaScript Articles
More By Chrysanthus Forcha