Iframe filtering

freecrm

New Member
Messages
629
Reaction score
0
Points
0
Not quite sure what you mean...?

The iframe purely references another page and shows that content in the page with the iframe...

If you have a div in your referenced page (the one the iframe is pointing to), you can delete divs in the same way as any other page???

It can't be this simple...
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Say that I want to iframe this forum for an example, but I don't want the header or sidebar, just the posts, would there be a way to filter out the header and sidebar, with like javascript?
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
Ooohh.. I get you...

I'm not sure there is any way to do this, unless there is a way to load the page as a string or array first - but even then, you need to know exactly what the position is of the divs, which may change depending on the parsing output.

Tricky..

Unless the forum outputs an rss feed, which can be easily accessed.
 

mephis

New Member
Messages
39
Reaction score
0
Points
0
I had a similar problem this week...
I decided the best way was to cURL the iframe page, store the html in a variable and just parse it to remove/retrieve the bits of HTML before putting them on my page (I did it through AJAX, but I'm sure you don't necessarily have to)
Although I'm sure you can access the contents of the iframe through javascript and remove the offending div(s)
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
... to remove/retrieve the bits of HTML before putting them on my page...

But if the page is dynamic, with changing content, how do you know how to set the string position to delete the divs at those points?

Unless you do a str_replace, but this will change code arbitrarily and not necessarily the bits you want it to.

I suppose this isn't such a problem with div id's, rather than classes.
 
Top