The scrollbar feature denotes whether or not the scroll bars should be displayed. The default value of the scrollbars feature is YES, displaying the scroll bars. If the value of the scrollbars feature is set to NO by the user, then the scroll bars are not displayed.
This allows the user the provision of adding the status bar or not. The default value to the status feature is YES, which adds the status bar. If the user sets the value of the status feature to NO, then the status bar is not added.
NOTE: this is called only if the application called is an HTML application, otherwise, calling the titlebar feature is not taken into account.
Like the scroll bar, the toolbar is used to denote whether the browser’s tool bars should be displayed or not. The default value of the toolbar feature is YES, displaying the tool bar. If the value of the toolbar feature is set to NO by the user, then the tool bar is not displayed.
This feature is used to specify the inner height of the window. The value for this feature is given in pixels.
This feature is used to specify the inner width of the window. The value for this feature is given in pixels.
This feature is used to specify the outer height of the window. The value for this feature is given in pixels.
This feature is used to specify the outer width of the window. The value for this feature is given in pixels.
If the user sets the value of the hotkeys feature to NO, then the window’s usage or function of hotkeys is disabled.
Another optional attribute that is passed to the open() method of window object is the replace method. This attribute is mentioned in the syntax of the open() method in above description. This specifies the way the entry in the history list is handled. This method is used to specify whether the URL has to create a new entry in the history list or replace the current entry in the history list. The replace attribute can take the values of true or false. The true value specifies that the URL replaces the current document in the history list. The false value specifies that the URL creates a new entry in the history list.
Let us see an example to understand the usage of open() method of window object in brief:
<head> <body> html>
location=yes, directories=no, status=yes, menubar=no,
scrollbars=yes, resizable=no, width=300, height=500")
<input type="button" value="Click Here to Display
The output of the above example is a button with the message:
When this button is clicked, the URL http://exforsys.com displays in a new window. This is because the first argument mentioned is http://exforsys.com and the second argument mentioned is _blank, denoting that the URL loads into a new window. The URL displayed in the new window has its window width as 300 and its height as 500. The value of width and height are mentioned as 300 pixels and 500 pixels respectively. The windows displayed have the scroll bars, tool bar, status bar displayed because the value of scrollbars, status and toolbar is set to yes, making these visible in the window. The window displayed is not resizable and is fixed in size because the resizable feature is set to no. The value of the menubar is set to no, displaying no menu bars in the final output window.