Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

224
Views
Pass data from child window to parent window in javascript

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!