views:

72

answers:

2

Hey guys, weird thing right now. i have an iFrame on one of my sites which grabs it's src from one of my other sites. So both belong to me and I can access both. However sameOriginPolicy is always in the way :)

i want to find a solution to autoResize the iFrame depending on it's content. i found a nice autoHeight jQuery plugin that would do that, but unfortunately it can't retriev the body height of the iFrame src because it's on an other domain.

i wonder now if theres a solution for that? for instance telling my src file that it's parent (the iFrame) should have a height of e.g. 300px. is that possible?

thank you for your help (and your tips)

A: 

One good technique we have been using is Fragment Identfier Technique.

http://www.webmasterworld.com/accessibility_usability/3635186.htm

Other good technique is use of proxy.

Create a proxy file on your domain. Set ur iframe url to proxy. From Proxy give hit to other domain using things like CURL (in php) and then get the height of proxy.

one good read for iframes is

http://softwareas.com/cross-domain-communication-with-iframes

sushil bharwani
A: 

you gotta fight iframes with iframes: http://stackoverflow.com/questions/153152/resizing-an-iframe-based-on-content

Vince