Complete example wiith sample code, check below link
Pass (Send) value from Parent page window to Child popup window using JavaScript
Parent Page
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
table
{
border: 1px solid #ccc;
}
table th
{
background-color: #F7F7F7;
color: #333;
font-weight: bold;
}
table th, table td
{
padding: 5px;
border-color: #ccc;
}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
First Name:
</td>
<td>
<input type="text" id="txtFirstName" value="Mudassar" />
</td>
</tr>
<tr>
<td>
Last Name:
</td>
<td>
<input type="text" id="txtLastName" value="Khan" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<input type="button" value="Send" onclick="SendToPopup()" />
</td>
</tr>
</table>
<script type="text/javascript">
var popup;
window.onload = function () {
popup = window.open("Popup.htm", "Popup", "width=300,height=100");
};
function SendToPopup() {
if (popup != null && !popup.closed) {
var lblFirstName = popup.document.getElementById("lblFirstName");
var lblLastName = popup.document.getElementById("lblLastName");
lblFirstName.innerHTML = document.getElementById("txtFirstName").value;
lblLastName.innerHTML = document.getElementById("txtLastName").value;
popup.focus();
} else {
alert("Popup has been closed.");
}
}
</script>
</body>
</html>
Popup Page
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
table
{
border:1px solid #ccc;
}
table th
{
background-color: #F7F7F7;
color: #333;
font-weight: bold;
}
table th, table td
{
padding: 5px;
border-color: #ccc;
}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
First Name:
</td>
<td>
<span id="lblFirstName"></span>
</td>
</tr>
<tr>
<td>
Last Name:
</td>
<td>
<span id="lblLastName"></span>
</td>
</tr>
</table>
</body>
</html>