I have some web pages that I just need to have the graph displayed inside. How do I show them all in one page with Iframe?
Asked
Active
Viewed 838 times
0
-
Normally you don't, the other server controls the page contents . You could try writing script pages that fetch the other site's page, scrape and parse it, then display that cut down version. If you do that don't be surprised if your server ends up blocked by the other site's firewall. – Dave S Sep 13 '19 at 21:18
-
All pages are in my own domain. – mor rah Sep 13 '19 at 21:29
1 Answers
0
You can't load part of a page with an iframe. You could load a specific section of the page with jQuery, a JavaScript library.
Example:
jQuery('#where-you-want-to-load-the-content').load('http://www.example.com/your-page.php #section-you-want-to-bring-in');
To explain: the #where-you-want-to-load-the-content
is representative of some ID on the page, like <div id="where-you-want-to-load-the-content"></div>
and #section-you-want-to-bring-in
is the HTML wrapper of the section of the page you're bringing in.
Example:
<div id="section-you-want-to-bring-in">Hello!</div>
will be brought into your code section <div id="where-you-want-to-load-the-content"></div>

Thomas Bennett
- 647
- 6
- 10