Forum: Ruby on Rails Displaying an existing web page within one of my rails pages

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Max W. (Guest)
on 2007-07-17 18:04
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.
Nathan Garza (Guest)
on 2007-07-17 20:01
(Received via mailing list)
You could use and iframe.  Your use it like this:
<iframe src="http://uri.for.existing.page"></iframe>
<!-- Your own code would go down here -->

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. <removed_email_address@domain.invalid> wrote:
>
--

Nathan Garza

AshLeaf Media | Director of Technology Innovations
_________________________________________________
www.ashleafmedia.com | removed_email_address@domain.invalid | 832.514.5726
Max W. (Guest)
on 2007-07-17 23:30
Nathan Garza wrote:
> You could use and iframe.  Your use it like this:
> <iframe src="http://uri.for.existing.page"></iframe>
> <!-- Your own code would go down here -->
>
> 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. <removed_email_address@domain.invalid> wrote:
>>
> --
>
> Nathan Garza
>
> AshLeaf Media | Director of Technology Innovations
> _________________________________________________
> www.ashleafmedia.com | removed_email_address@domain.invalid | 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. :)
ebrad (Guest)
on 2007-07-18 01:10
(Received via mailing list)
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. <removed_email_address@domain.invalid>
Max W. (Guest)
on 2007-07-18 12:10
>
> 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.
This topic is locked and can not be replied to.