In the preceding article we saw how a scrollbar can be hidden from view or be made transparent by putting the same color value as the web page background color (HTML color name or color code) to all scrollbar css properties. This is fine for web pages whose content fits in the browser display area because Netscape and Mozilla display no scrollbars for such pages and for Internet Explorer the scrollbar can be made transparent or hidden because it recognizes the CSS scrollbar properties. Also, if the web page content is more than the browser display area, Internet Explorer would show no scrollbar because it understands the scrollbar css properties but Netscape and Mozilla will display a scrollbar.
window.open('URL', 'NAME', 'FEATURES', 'REPLACE')
We have already seen that if we provide the filename of a web page through the first argument, it will be loaded in the new window.
NAME: specifies a name for the new window that can then be used as value for the target attribute of <a> tags.
FEATURES: let you define properties of the window such as width, height, presence or absence of scrollbars, location bar, status bar etc.
REPLACE: takes a boolean value… we won’t bother ourselves with this argument!
List of important FEATURES
The above opens a new window 300 pixels in width and 200 pixels in height. Pay close attention to how the features are written. The two features (width and height) are enclosed by a pair of quotes without any spaces and there are no quotes surrounding the values.
Did you notice something in the new window?
It didn’t have any scrollbars, location bar, status bar, menubar, toolbar or buttons!
The width and the height take a number (pixels) as value, for other features the value is either a yes or no.
This window has the menu and the status bars. The others are absent since we didn’t specify them.
But before that, here is a small novelty for Internet Explorer users.
The fullscreen feature is specific to this browser and displays the document on the entire screen. A neat effect… sort of! Click on the F11 to remove the full screen display.
Note: Firefox and Netscape also open a full sized window but show the title bar at top.
The internal codename for the iPad at Apple was K48. [more...]