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
Suman KunduSuman Kundu 

Redirection Issue from JS due to "Load denied by X-Frame-Option"

Hi All,
I am developing a VF page completely built in JS. After performing some action, it should redirect to newly created sobject standard page. But found issue:

Load denied by X-Frame-Options: https://na3.salesforce.com/<ID> does not permit cross-origin framing.

Though I have not used any <iframe> in my page, I am getting the above error. When I checked the firebug, I found one auto generated <iframe>, looks like:

<iframe id="contentPane" name="contentPane" onload="initContentFrame('https://c.na3.visual.force.com/apex/MyVFPage?core.apexpages.devmode.url=1', true, false , 'https://na3.salesforce.com' );" src="/blank.html" style="width: 100%; height: 100%" title="Content Pane" frameborder="0"></iframe>

I really have no clue where from it comes, and why it resists me to redirect from JS.

So it will be very helpful for me if anybody would let me know the reason and solution.

Thanks
bob_buzzardbob_buzzard
Is your VF page nested inside another page - a standard record view, dashboard or home page for example?
grandersgranders
I had the same issue. I had to update the link to have a target=”_top” attribute.

This post solved my problem:
http://paulbattisson.com/tag/x-frame-options/

Caleb KuesterCaleb Kuester
@granders: the page apparently no longer exists