ON 20040403@10:38:40 AM at page: http://techref.massmind.org/techref/language/java/script/xwinaccess.htm#38080.4435069444 James Newton[JMN-EFP-786] Says How can a script in one frame access data in another frame, when the domains of the respective frames are not the same?
In the following discussion, we use a scenario in which an organization (client.com) is attempting to integrate content from one server with another server or from two different vendors (www.lmsvendor.com and www.lcmsvendor.com). The first step is for the client.com to map the two systems as follows: lmsvendor.client.com and lcmsvendor.client.com.

Next, the LMS vendor can expand the range of access to a suffix of the site name space. For example, a page on the lmsvendor.client.com can use the document.domain property to set the access level to client.com as opposed to lmsvendor.client.com; that is, up to the second-level domain. The following JavaScript code provides an example of how this is done:

document.domain = document.domain.substring(document.domain.indexOf('.') + 1);
Similarly the LCMS vendor sets up the document.domain property to client.com. Please note that this JavaScript statement needs to be included in each page of the system presented in the Web browser. Since only pages from a site whose name ends with client.com will permit this domain to be set, it is assured that content from the same provider mutually agrees to interact and is free to do so. Please refer to:
http://msdn.microsoft.com/workshop/author/om/xframe_scripting_security.asp for more information.

The above solution works well for simple Web pages, however the following scenarios provide a few exceptions and some additional workarounds.

Scenario #1: Modifying the contents of a frameset using JavaScript in another frame or the parent frameFor example, the following code generate a permission denied error even though you have put the document.domain code in every page:

frames["frame1"].window.document.open() 
frames["frame1"].window.document.write('New Frame Text') 
frames["frame1"].window.document.close()
The following JavaScript code seems to address the above problem:
frames["frame1"].window.document.write('