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

312
Visualizações
Iframe check for the response after submitting the form in React

I have been trying to embed Iframe in my react js project. The issue i am facing is that the source of Iframe is an external url which returns HTML form to me and then when i submit that form, they hit their own api to validate data and return HTML for success or failure.

So i need to access some specific classnames in order to know whether my response is successfull or not like

alert-success for success response
alert-failure for failed response

This is my code below for that

<iframe
              id="one"
              src={`https://xxxxxxxxx.com/Payments/xxxxxx?id=12232331&pais=pt&aseguradora=dg&nombre=CustomerName&apellidos=CustomerSurname&codPostal=CustomerPostalCode`}
              width="100%"
              height="300"
            ></iframe>

Now how can i access the classname in order to find response for that form, or is there any other workaround for this ?

tried var iframe = document.getElementsByTagName("iframe")[0];

but then I cannot access any classnames here or even after submitting the form (for alert-success or alert failure)

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