2

I don't know if this is more of a html problem, anyway, I am trying to embed a site.com page into a div in an html page.

The vf page can be seen in my browser so it should not be a visibility problem. I've tried with an iframe with this tag:

<iframe id="theFrame" src="http://test.force.com/site/TestPageSite" style="width:100%;" frameborder="0">
</iframe>

And also with a div:

<object type="text/html" data="http://dev-org.cs17.force.com/survey/TestPageSite" style="width:100%; height:100%">
<p>backup content</p>

But I can't see anything. Do you believe this is a Site.com page problem? The page is actually very simple - it was just a test:

<apex:page >
  <!-- Begin Default Content REMOVE THIS -->
  <h1>Congratulations</h1>
  This is your new Page
  <!-- End Default Content REMOVE THIS -->
  <apex:outputText style="font-style:italic" value="This is {0} text with {1}.">
       <apex:param value="my"/>
       <apex:param value="arguments"/>
    </apex:outputText>
</apex:page>

Do you have any idea why this happens? Thanks.

  • Is this Site.com or a Force.com Site? Based on your code including Apex (not available in Site.com pages) I think it is a Force.com Site. – Peter Knolle Jan 9 '15 at 17:48
1

This is likely due to the X-Frame-Options HTTP header.

On the Force.com Site itself, can you enable 'Allow in Frames'?

  • 1
    Yes, by setting the Clickjack Protection Level to 'Allow framing by the same origin only (no protection)' it works. Thanks! – tony danza Jan 12 '15 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.