The
returnValue
reference looks odd to me. That's either associated with a
dialog
element, which is still experimental, or the
showModalDialog
method, which is no longer supported in any modern browser.
If by "child window" you mean you've embedded one page inside another using an
iframe
, you should be able to create a function in the parent window and call that from the child window:
window.setFolio = function(folioID, folioName) {
document.getElementById("txtfolio").value = folioName;
};
parent.setFolio(Number(txtfolioID.value), txtfolioName.value);
NB: Both documents will need to be served from the same origin
(protocol, host name, and port number) for the call to work. If you need to make a cross-origin call, you would need to use
postMessage[
^] instead.