Please see this post and my answers: Calling a parent window function from an iframe
It is possible, but not easy. You have to hack about a bit to get it to work.
I believe that, because you have access to the framed domain and frame page domains, you will be able to use the document.domain-in-the-head trick.
<script>
document.domain = "mydomain.com";
</script>
Update:
Can I just check the following?:
Have you put the document.domain <script>
in the head of both pages?
Do both have the exact same string, i.e. both have "subdomain.mydomain.com"
or both have "mydomain.com"
? Typically you use this to ensure that the framed page has the same document domain as the parent.
Do you still get a security error after calling a parent function from the framed page?
If not, this is the function I use to resize my frame. It is located in the head of the framed page.
window.ResizeFrame = function (newHeight) {
if (window.parent && window.parent.document) {
var $frame = $(window.parent.document).find("#frame-id");
if ($frame.length) {
if (typeof (newHeight) === "number") {
$frame.css("height", newHeight);
}
}
}
};
Let me know how it goes!