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.
Opening closing & Passing data from Child window to parent window in JavaScript & refreshing main
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.
<a href="javascript:void(0);" NAME="Error Handling"
title="ZeroDivisionError handling"
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>
JQuery Manaing Parent & Child window Pass the data betweeen parent and child window and refreshing part of the parent window once Data is changed at child window.
Scrollbar on child window
We can add scroll bar to child window by adding scrollbars=1 while opening the window. Here is the modified code.
<a href="javascript:void(0);" NAME="My Window Name" title=" My title here " onClick=window.open("window-child.html","Ratting","width=550,height=170,0,status=0,scrollbars=1");>Click here to open the child window</a>