Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

223
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda