Iframe and overflow

I have a site with an iframe on it.

I have been trying to resize the iframe to its contents so that the frame doesn’t need scrollbars but I run into problems if the page being loaded isn’t on the same domain as mine as I can’t then re-set the depth.

I have been poking around and wondered if I could set the iframe to overflow into the main page which would then mean that I could set the scrollbars to no and just leave it at that.

Is this possible ? and can anyone point me in the right direction.

Thanks, yours desperately

Paul

Subject: iframe and overflow

OK - I give up. Browser restrictions being what they are, you COULD use an Ajax-based approach:

http://www.phigsaidwhat.com/Phigmentb/phigment.nsf/dx/using-an-agent-to-work-around-the-ajax-cross-domain-limitation.htm

HTH,

-Chris

Subject: iframe and overflow

Hey Paul,

You should be able to get your iframe to resize via getting the context size of the loading iframe content and dynamically resizing your iframe.

I’ll play around and see what I can come up with for ya, but that’s basically where my mind’s heading with this one…

HTH,

-Chris

Subject: RE: iframe and overflow

Chris

It would be brilliant if you could as I have been battling this one for ages and no-one else has been able to help.

As I said I have been able to resize the Iframe onLoad but only if the page is on the same domain as mine. Our search and diary pages are on a different domain and it is here that I struggle as it throws a cross-site scripting something or other.

Here is another (related) posting that I made.

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/8d41caa0d8e53d5c852573e10059834e?OpenDocument

Cheers

Paul

Subject: RE: iframe and overflow

As long as Mozilla isn’t a browser consideration:

http://developer.apple.com/internet/webcontent/iframe.html

You should be able to grab “remote” context information, such as the height, etc. with this hack.

I know that cross-domain script security is needed, but ultimately makes our jobs THAT much more difficult. I wonder if it’s worth investigating disabling that feature (if it’s even possible) for trusted domains? Certainly help with intranet-development efforts, which it sounds like this is what you’re looking for.

Warrants some more testing/playing-around me thinks…

-Chris