function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

This content cannot be displayed in a frame

I'm opening a VFP2 in a frame in VFP1. In VFP2 i hava an enhanced list. when i click on edit it shows the error"This content cannot be displayed in a frame". please i need help

<apex:page sidebar="false" showHeader="true"  id="page" title="Quest">
    <script language="JavaScript" type="text/javascript">    
    function cleariFrame(source){        
        if(source == '')
            var iframe = document.getElementById('questframe').src="";     
            var iframe = document.getElementById('questframe').src=""; 
            var iframe = document.getElementById('questframe').src=source;
    <apex:tabPanel selectedTab="News" id="QuestTabPanel"  tabClass="activeTab" inactiveTabClass="inactiveTab"  switchType="client">
        <apex:tab label="News" name="News" id="tab1" ontabenter="cleariFrame('/apex/QNewsList_VFP')"/>
<apex:iframe id="questframe" src="/apex/QNewsList_VFP" scrolling="true"/>

<apex:page sidebar="false">
    <script language="JavaScript" type="text/javascript">  
            if (window.location != window.parent.location) {        
                document.getElementById('AppBodyHeader').style.display = "none";
                document.getElementById('sidebarCell').style.display = "none";               
    <apex:includeScript value="//"/>
        j$ = jQuery.noConflict();
        j$(document).ready(function() {
    <apex:enhancedList type="QNews__c" height="500" rowsPerPage="10" id="QNewsList"   />
Best Answer chosen by rebvijkum
SonamSonam (Salesforce Developers) 
 Could you please check if  Session settings >Clickjack Protection  is enabled in your ORG?

If enabled try to disable and carry out the same steps and see if this fixes te issue...Though this is a security feature, however, it will affect the way frames can be implmented in your ORG.

read more in detail on the below link: