Skip to main content

Permission denied to access property 'document' With Facebook

Hi Guys,

Recently I was using Facebook application 'RSS Graffiti' to feed rss feeds into my profile. 'RSS Graffiti' excellent application and can be configured within few steps. Here I'm not going to explain how it is configured but I'm going to discuss here different issue. This is not related to RSS Graffiti.

I configured RSS Graffiti and feeds are successfully publishing in my profile wall. It publishes brief description and a link to the another site(RSS feeds originally come from this site). Let say Facebook is SiteA and the second site which is opened from the link clicked on the Facebook is SiteB.

In Javascript term we can say SiteA(FB) is a opener and SiteB(opening window) is the child window. So Opener opens a child window. Hereafter Ill use these Javascript terms on behalf of non-technical terms.

I clicked on the link in the opener and it opens child. And now within child I have a button and clicking on this button it should be refreshed the opener and reload another URL into the opener. Code for this.

opener.document.location = MyNewUrl;

But what happened is code executed to the this line and generates a Javascript error like this.
Permission denied to access property 'document'
opener.document.location = MyNewUrl;

Comments

Popular posts from this blog

Upload CSV file using opencsv with Play 2.0.2, Scala and MongoDB

Hi Everyone... Today I'm going to explain you that how we could upload a CSV file with list of products to the MongoDB table. The way I'm describing here might me inefficient but still it is useful. We know that Scala is running on JVM and so that we can use any java library with Scala . I will use OpenCSV as a CSV parser for this program. OpenCSV is a CSV parser library for Java. No matter it is for java here we will use it with Scala. First we should have MongoDB up and running. Include following opencsv dependency in your build file. I'm using SBT as building tool. "net.sf.opencsv" % "opencsv" % "2.1" Here next I will create view file. Name of this file will be 'index.scala.html'. @(message: String)(implicit request: RequestHeader, flash:Flash, l: Lang=Lang("en")) @import play.api.i18n._ @import views.html.helper._ @main(message, null) { //print messages @if(flash.data.contains("message")){ ...

Scala : not enough arguments for constructor : ()

not enough arguments for constructor : ( ) Here Im trying to create new Object from case class in scala, but I get this error withing my following code. def getTax(id: ObjectId): models.Tax = { models.Tax.findOne(MongoDBObject("_id" -> id)) .getOrElse(new models.Tax) // this line is generating error } It says that it cannot build a new Tax object without providing the constructor arguments. That is correct, If we want to buld an object we should provide constructor arguments. Just take a look at my Tax class. case class Tax( id: ObjectId = new ObjectId, var name: String, var description: String, var defaultFlag: Boolean, var rate: List[Rate] = List.empty ){ } I have specified default values for id field and rate field but what about name, description and defaultFlag field. There are no default values for them. So if we want to create and object like this 'new models.Tax' (which means without passing arguments to constructor), you should pr...

Way to Resolve 'no persistent classes found for query class'

Last few days I had experience about this issue. I was developing test application with Spring 3, Hibernate 3.3.1, Maven 3 and Jboss 5.0. I had a class called Employer and it was annotated. Here I have given sample. This is under the package hrm.com.domain. @Entity @Table(name="employer") public class Employer { @Id @Column(name="ID") @GeneratedValue private Integer id; My application was Spring MVC application and Im not going to post all the source code here. I had following configuration files. 1. hibernate.cfg.xml 2. spring-servlet.xml 3. web.xml Here is javax.persistence dependency in my POM.xml file. (I have only post here is important part) javax.persistence persistence-api 1.0 Then I built the application and copy the war file into jboss_home/server/default/deploy directory. Then Server is started. Server is started without any issue. Interested thing happened when I run the application in the web browser. Application needs to list down all the employ...