How to return value from child window to parent window using window.open in Javascript?

you can do it like this:

In parent:

function openChildWin() {   
    var childWin = window.open("childWin.html", "_blank", "height=400, width=550, status=yes, toolbar=no, menubar=no, location=no,addressbar=no"); 
}
function setValue(val1) {
   // do your logic here
}

in popup:

function OKClicked() {
    window.opener.setValue(true);
}

Use below code and replace test with your element Id.

var parentDoc = window.opener.document;
parentDoc.getElementById("test").value = document.getElementById("test").value;