Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

222
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda