Displaying an existing web page within one of my rails pages

Does anyone know how to, given the url, display another web page inside
one of my own pages in rails? I want to basically show the whole page
and then have my own extra stuff at the bottom, after it.

You could use and iframe. Your use it like this:

iframe’s have several other atributes other than src. You can specify
scrolling, width, hieght, border, etc. w3schools.com is a good
resource.

Good luck

nathan

On 7/17/07, Max W. [email protected] wrote:

Nathan Garza

AshLeaf Media | Director of Technology Innovations


www.ashleafmedia.com | [email protected] | 832.514.5726

Nathan Garza wrote:

You could use and iframe. Your use it like this:

iframe’s have several other atributes other than src. You can specify
scrolling, width, hieght, border, etc. w3schools.com is a good
resource.

Good luck

nathan

On 7/17/07, Max W. [email protected] wrote:

Nathan Garza

AshLeaf Media | Director of Technology Innovations


www.ashleafmedia.com | [email protected] | 832.514.5726

That’s exactly what i needed, thanks! I solved the problem in a not
very satisfactory way by pulling all the html out and then just shoving
it into my page, but the layout was often broken. This is perfect. :slight_smile:

Here’s an alternative method using iframes. Haven’t used it myself.

Description: Want to dynamically include the contents of another page
onto the current without resorting to server side means (ie: server
side includes)? This script uses the IFRAME tag, and by automatically
resizing it based on the actual height of the containing page, allows
you to seamlessly display external content on your page. In other
words, the iframe is automatically resized to be only as tall as the
external page’s height. The script works in both IE5+ and NS6+, and
for other browsers, supports the option to either completely hide the
iframe in question or display it using its default height. Now that’s
SSI DHTML style!

Note that as with SSI, the external page referenced by the iframe must
be from the same domain as the page the iframe tag is inserted in.
Setting the iframe’s src to an external site such as “http://
www.google.com” will not work, since the script cannot probe and
detect the height of pages from external domains.

Iframe SSI script

http://www.dynamicdrive.com/dynamicindex17/iframessi.htm

On Jul 17, 3:30 pm, Max W. [email protected]

Note that as with SSI, the external page referenced by the iframe must
be from the same domain as the page the iframe tag is inserted in.
Setting the iframe’s src to an external site such as “http://
www.google.com” will not work, since the script cannot probe and
detect the height of pages from external domains.

That sounds interesting but the “has to be in the same domain”
limitation makes it no good for me. Thanks a lot though.