wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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

javascript to detect chrome url from iframe

yudi raj

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

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

I agree. Here's the link: http://aspose.com/file-tools
subject: javascript to detect chrome url from iframe
Similar Threads
Loading a jsp page in a popup loaded in another domain
Struts2: Accessing a request Parameter from Action
session migration
sharing of resources like html / jsp out of web application
how to specify domain in "url" , in getServletContext() . getContext("url")