Reputation: 11448
I am playing with jquery.
I have loaded a wikipedia page into an iframe. This was fun and good.
Now, I want to remove an element from the wiki page I loaded inside the iframe (or maybe reload it into iframe without that element?). As an example, say I want to remove the 'left-navigation' element or something similar.
Is this possible? If so, how can I?
Upvotes: 0
Views: 427
Reputation: 11
When you see the page source through your browser, does it show you everything? if it does, then, yes it is possible to manipulate the content and show it in your website. I don't remember the exact functions, but I did something very similar a long time ago using PHP. steps included, loading the whole page content (including html tags) of a given url into a variable and then do a string search, find what you need, remove it and then echo the remaining in your website. if you had problems figuring it out, leave a comment anywhere on "boombud dot com" and i'll try to be more specific.
Upvotes: 1
Reputation: 23303
You cannot. This is apart of the cross-domain policy. You cannot "mess with" so to speak, iframes that are loading a page from another domain. Obviously, this does not apply to iframes linking to pages on your own domain. This articles discusses some solutions and hacks on the issue: http://softwareas.com/cross-domain-communication-with-iframes
Upvotes: 0