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

Unsafe JavaScript attempt to access frame with URL



I have a custom visualforce page with some javascrpit in it and I am getting this error: Unsafe JavaScript attempt to access frame with URL


Can someone help me figure out why the values are being passed incorrectly.


<apex:page standardController="lead" showheader="false" sidebar="false" id="pgId"> 
<apex:includeScript value=""/>
<apex:includeScript value=""/>
<apex:includeScript value="{!URLFOR($Resource.tablesorter, 'jquery.tablesorter.js')}"/>
<apex:stylesheet value=""/>

  <p id="hello">Hello World</p>
  <a href="" class="name">google</a>
  <a href="" class="name">yahoo</a>
  <div id = "searching" title= "Searching.............">

<script type="text/javascript">
var j$ = jQuery.noConflict();
  $j("#searching" ).dialog({ 'autoOpen': true });


 this throws:

 Unsafe JavaScript attempt to access frame with URL from frame with URL Domains, protocols and ports must match.



It's a security feature of Javascript called Same Origin Policy.


That said, I can't see why you are having a problem with the code you have posted.  Is that the entire page?


Would you by any chance be using the Development Mode Footer/inline VF editing?  Try turning it off.


Hi, Did you find any solution to this problem? 


I think its just a general problem of having a VF page within a home page component?


Similar thread..