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

140
Visualizações
HTML content from an iframe is not present after loading

I have a webpage with an iframe element which points to an external form (from a third-party website):

<p><iframe id="ifmSearch" style="width: 100%; min-height: 800px;" title="Form" src="https://thirdpartysite.com"></iframe></p>

I have written the following code to read the third-party form embedded in the iframe:

$('#ifmSearch').on('load', function() {

    document.getElementById('myForm').addEventListener('submit', function(event) {
        event.preventDefault();
        console.log(document.getElementById('notice').value);
        var form = new FormData();
        form.append("email", document.getElementById('myEmail').value);

        var settings = {
            "url": "http://localhost/send-mail.php",
            "method": "POST",
            "timeout": 0,
            "processData": false,
            "mimeType": "multipart/form-data",
            "contentType": false,
            "data": form
        };

        $.ajax(settings).done(function(response) {
            console.log(response);
        }).catch(error => console.log('error', error));
    });

    console.log('loaded');
});

But... the form with id myForm is not present after the iframe loading.

Thanks in advance for your help. Any comment or answer will be helpful for me.

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