Passing data from child window to parent window
In this blog, i will show you how to pass data from child window to parent window.
1. Create a form in parent window.
<form name="parent" id="parent">
<input type="text" id="test" >
<a onClick=window.open("child.html","TITILE",
"width=850,height=150,status=1,");>open the child window</a>
</form>
2. Create a second window
<form name="child" id="child"> <input type="text" id="test_2" name="test_2" value="YOUR DATA"> <input type="button" id="submit" value="submit" onclick="call_submit();"> </form>
3. Pass data to parent window by javascript
function call_submit()
{
opener.document.parent.test.value=document.child.test_2.value
self.close();
}



