Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

141
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!