So far as I know if the child page (Inside the IFRAME) and the parent page (That contains the IFRAME) are originated from the same domain, then only the child page can access the Document Object Model of the parent page and vice-versa.
On the other hand, if the child page and the parent page are originated from different domain, then, the child page cannot access the Document Object Model of the parent page. Also, the parent page cannot access the Document Object Model of child page.
However, I found a cool idea that utilizes the fact that, despite the parent and child pages are form different domain, they can access each other's URL (location.href). So, when the child want to do something on the parent page, it does as follows:
1. Child page modifies the location.href of the parent page by appending a fragment identifier (The hash part of the URl, such as, http://www.mysite.com/default.aspx#introduction, here #introduction is the fragment identifier). The fragment identifier that is to be set is usually the parameter value that the child page wants to send to the parent page.
2. The parent page continuously polls it's URL value at a certain time interval and whenever it detects a change in its URL value (location.href), it splits the fragment identifier value and updates its own DOM.
Using the same technique, the parent page also can trigger some change in the child page within an IFrame.
You can see a demo here :
http://ajaxify.com/run/crossframe[
^]