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

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