aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes javascript to detect chrome url from iframe Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "javascript to detect chrome url from iframe" Watch "javascript to detect chrome url from iframe" New topic
Author

javascript to detect chrome url from iframe

yudi raj
Greenhorn

Joined: Nov 11, 2011
Posts: 12
I am having an application in an iframe and I am calling this from a different domain. For example, my browser url is a.com and my iframe url is b.com (different domain). I am loading this iframe (b.com) in a.com thus making their domains different.
I tried with the below function in js, this works in IE and Mozilla, however, with Google chrome, my js is not able to reach the browser url.
Would appreciate if anyone can give me some direction on this

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
The same origin policy keeps a from talking to b.

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: javascript to detect chrome url from iframe