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

221
Views
Sending data from child window to parent window using Javascript

I have a parent popup and a child popup and I want to pass one array to the parent popup using Javascript. I tried everything but it's not working at all. What should I do here?

The code below does nothing. I want to put the value of ret into the parent window.

var ret = new Array(Number(txtfolioID.value), txtfolioName.value);
var opener = window.opener;
if (opener) {
  opener.setFolio(Number(txtPortfolioID.value), txtPortfolioName.value);
}

Parent aspx page

window.setFolio = function (folioID, folioName) {
  document.getElementById("txtPortfolio").value = folioName;
};

Console Error

firebug-lite.js:11885 [Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.

EDIT I changed the code completely and now I am checking that element exists in DOM or not.

      var folio = window.parent.document.getElementsByName("txtPortfolio");
      folio.value = 'somevalues';

but I am not able to assign the value the textbox.please help

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!