I tried to pass data from child window to parent window using javascript but parent.returnvalue is not working in chrome. Is there any alternative of parent.returnvalue??
CODE
var txtfolioID = document.getElementById('<%= txtfolioID.ClientID %>');
var txtfolioName = document.getElementById('<%= txtfolioName.ClientID %>');
var ret = new Array(Number(txtfolioID.value),
txtfolioName.value);
parent.returnValue = ret;
This parent.returnValue is not working at all. Please help
EDIT I changed the code parent.returnValue to this
var opener = window.opener;
if (opener) {
var oDom = opener.document;
var elem = oDom.getElementById("txtfolio");
if (elem) {
elem.value = 'Success';
}
}
Now the error Cannot read properties of null (reading 'document') is gone but still it's not showing the child window value to parent window. Any idea?