How to Remove DIV from Iframe?

How can you display a selected element such as a <div> from another website within an <iframe> on your website?

  • for example if you wanted to display the feed of your own blog within another set of blogs that you own. or if you wanted to display something from a site that you do not own into a container in your own website. Normally in an iframe you put the entire site, but what if you just want one element of that page? Looking very specifically for technical answers not philosophical or business suggestions, legal issues, etc.

  • Answer:

    You can definitely do that if you own both the domains, also there is also the possibility of doing it when someone else owns it too.. Kindly refer 'Cross Document Messaging'. It is still very much a work in progress, but it does what you ask for. http://www.whatwg.org/specs/web-apps/current-work/multipage/web-messaging.html

Sai P Chandramouli at Quora Visit the source

Was this solution helpful to you?

Other answers

You could scrape the page - say once every 24 hours - and grab what you want. There are plenty of articles out there on how to scrape a page.

Mark Simchock

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.