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

110
Views
Embed HTML Table from another website using JS

I want to embed a table (example: https://football.mitoo.co.uk/LeagueTab.cfm?TblName=Matches&DivisionID=1049&LeagueCode=SSEC2021) from another site (Yes, I am aware of the potential security risks) on my website.

The below code results in Uncaught DOMException: Blocked a frame with origin "https://example.com" from accessing a cross-origin frame.

<div id="LeagueTable"></div>
<iframe id="iframe" src="https://football.mitoo.co.uk/LeagueTab.cfm?TblName=Matches&DivisionID=1049&LeagueCode=SSEC2021" style="display:hidden;"></iframe>

<script type="text/javascript"> 
var iframe = document.getElementById("iframe");
var div = document.getElementById("LeagueTable");
div.innerHTML = iframe.contentWindow.document.querySelector("body > table.leagueTable").innerHTML;
</script>

I have also tried using fetch(url) with similar results.

about 4 years ago · Santiago Gelvez
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!