More in this section

Forums / Developing with Sitefinity / Loading static content in to an IFrame

Loading static content in to an IFrame

3 posts, 0 answered
  1. Stuart Hemming
    Stuart Hemming avatar
    144 posts
    Registered:
    07 Jul 2004
    12 May 2010
    Link to this post
    I'm trying to get an HTML page that I have added to the sitefinity web site to display on a page.

    in my masterpage, I have this ...

              <div id="content">
                <asp:contentplaceholder id="ContentHeadImage" runat="server"></asp:contentplaceholder>
                <asp:contentplaceholder id="Content" runat="server"></asp:contentplaceholder>
                <iframe id="frame1" width="400" height="200" scrolling="no" src="HTMLPage.htm"></iframe>
              </div>

    When I view the template I can see the content of the IFrame, but when I view any page that uses that template, I see an error message (see attached).

    Questions:
    1. Is it actually possible to do what it is I'm trying to do?
    2. If the answer to 1. is "yes", what am I doing wrong?

    Oh, and the reason for trying to do this? I want to display a couple of PayPal 'buy now' buttons on the page.
    -- 
    Stuart
  2. Stuart Hemming
    Stuart Hemming avatar
    144 posts
    Registered:
    07 Jul 2004
    12 May 2010
    Link to this post
    FWIW, I've established that I can access content external to the site by including a full URL. This is what I'd expect.

    I suspect that there is a simple trick to making sure that the URL is right for a local page, but I'll be jiggered if I can figure out what it is.

    -- 
    Stuart
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    12 May 2010
    Link to this post
    Hi Stuart Hemming,

    The scr attribute value is most probably wrong. If the page is in the project root you could access it as you have done in your sample. There should not be a problem to open an external page in iframe using Sitefinity.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
3 posts, 0 answered