Opening a small (or child ) window from a main ( or parent ) window
We can open a small window known as child window by clicking a button or a link or a image of a main window. We can control the width, height and location ( alignment from top left corner of the screen ) of the small window from the main window.
Here we can control the status bar, tool bar and resize the child window from the main window. By changing the value of status to 1 form 0 (status=1;) we can display the status bar for the child window. Same way by making the toolbar=1; we can display the tool bars for the small window. We can change the value of left to position the window horizontally. If we make the value of left to 0 like left=0; to align the window to left edge of the screen. Same way by making the top=0; we can place the window at the top of the screen. Don't forget to refresh the parent window every time you change the parameters.
onClick=window.open("window-child.html","Ratting","width=550,height=170,left=150,top=200,toolbar=0,status=0,");>Click here to open the child window</a>
We can add scroll bar to child window by adding scrollbars=1 while opening the window. Here is the modified code.