Cross sub domain iframes and JavaScript

RyanP13 picture RyanP13 · May 18, 2011 · Viewed 25.9k times · Source

I am working on a CMS site whose domain is:

http://www.acmssite.com

They have a sub-domain where they store a form system:

http://www.forms.acmssite.com

I have an iframe on the first that looks at a form in the latter.

I need to run scripts to manipulate the latter from the former and was wondering is this possible?

Answer

Dark Falcon picture Dark Falcon · May 18, 2011

In order for this to not be restricted by the same origin policy, you will probably need to do this in both the pages:

document.domain = "acmssite.com";