tags:

views:

117

answers:

1

I have a IFrame where I load in a custom search, and display the results within the iframe. The search results I obtain by calling an external url, that returns a value. I need to implement the same thing for a mobi site that works on mobile devices, and thus I need to replace the IFrame with something else. Will this be possible using a div tag, since most mobile devices do not support frames. And no javascript may be used. Any advice will be appreciated.

+2  A: 

You have to put the content directly on the page when it is initially built.

Since you say it is external, this will probably involve using curl to fetch the content, parsing it, extracting the content (discarding the <head> for instance) and inserting it onto the page.

Note that this is stepping into even hotter copyright waters then iframing content from an external site — so make sure the data provider is happy for you to do this.

(Or use an <object type="text/html"> which is effectively an <iframe> with worse browser support)

David Dorward