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

225
Vistas
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
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