Hi jo15765,
Refer below example.
HTML
Default
<input type="text" id="txtId" />
<input type="button" value="Send" onclick="SendData()" />
<hr />
<span id="lblId" />
<script type="text/javascript">
function SendData() {
var id = document.getElementById("txtId").value;
var popup = window.open("Popup.aspx?Id=" + id, "Popup", "width=300, height=100");
popup.focus();
}
function GetData(data) {
document.getElementById("lblId").innerHTML = data;
}
</script>
Popup
<script type="text/javascript">
if (window.opener != null && !window.opener.closed) {
var id = location.search.split('=')[1];
// Get data from API based on the Id.
window.opener.GetData(parseInt(id) + 1);
window.close();
}
</script>
Screenshot