Sunday, March 21, 2010

IFRAME content in different domain

In one of my requirement I had to include an IFRAME on the CRMForm. The IFRAME url points to a website in a different domain. The website had a JavaScript code which would populate value on two fields in the CRM Form.

Since the website and CRM Form were on different domains the JavaScript within the website could not access the fields on the CRM Form. So I had to write the below code on the website and CRMForm which made the domains same.

document.domain = "domain.com";

No comments:

Post a Comment