I am trying to get an iframe B communicate with site A. I’ve searched and searched and every thing I read says it’s impossible if they are of different domain (the iframe src is coming from a sub domain).
I want to communicate because my company has ads on its page and it needs to refresh them every X minutes. This is ok if it’s a normal add, but some adds extend. Like I have adds that start with 300×250 and then get to 800×300. I wanted to communicate to the iframe to know when the add was going to expand but it just doesn’t seem to be a way. Is there any way to let the add go beyond the initial size of the iframe?
If the add is 300×250 the iframe will also have 300×250, but when the add expands it get’s cut off, so I really need to either get the iframe to expand also or have the add go beyond the size of the iframe.
Anyone know how to do this or have some tutorial that shows how to have some basic communication to an iframe.
Note: There are some websites that also serve adds that have a totally different domain, so it would be great if someone knew how to make it go beyond the iframe.
Thanks
There is a way to do cross-domain communication using iframes, described in an answer to Resizing an Iframe based on content.
Many ad-serving companies serve their banners on your site via iframes, and use the technique outlined in the answer above to ensure that the iframe can expand to the full required size of the creative.