32 posts
    Has been part of the Envato Community for over 5 years Has referred 100+ members Has sold $10,000+ on Envato Market Located in Canada
+2 more
idowebdesign says

Hi,

I am building a page for a customer (real estate) that needs to retrieve listings from an external source (URL). I am ok loading it with Iframe element, it works great but I don’t know how to resize the height to avoid the scrollbar on the side of the element. I have read tons of articles that shows how to do it but for internal page only (under the same domain name). Browser security won’t let you get the height of an external url.

Anyone, ever came across this issue and found a solution?

Thanks a lot !

2444 posts
    Has referred 100+ members Has sold $100+ on Envato Market Has been a beta tester for an Envato feature Has collected 10+ items on Envato Market
+3 more
digitalimpact says

how are you pulling the data from the external source?

Why not use AJAX +PHP, within a div? (you’ll need the PHP to access data from a different domain, JS can’t help, but I guess you already know that :) )

Anyway, while I don’t know the technical part, I’ve seen it done lots of times. Loose those iFrames ;)

32 posts
    Has been part of the Envato Community for over 5 years Has referred 100+ members Has sold $10,000+ on Envato Market Located in Canada
+2 more
idowebdesign says

The thing is that I cannot do a PHP request as I only have a HTML page render accessible. I have no access to the listing code, they just provide me a link where the page is render and I need to display this page on my page.

Thanks

2263 posts Bird is the word..
    Has referred 200+ members Has sold $500,000+ on Envato Market Has been a beta tester for an Envato feature Has collected 100+ items on Envato Market
+8 more
jonathan01 says

As far as I am aware an iframe cannot auto resize it’s height.

86 posts
    Has been part of the Envato Community for over 6 years Has sold $100+ on Envato Market Has collected 10+ items on Envato Market Sells items exclusively on Envato Market
singh336 says

the way an iframe works, as far as i know, is not going to allow it to resize its frame

do the whole div thing instead ! :)

32 posts
    Has been part of the Envato Community for over 5 years Has referred 100+ members Has sold $10,000+ on Envato Market Located in Canada
+2 more
idowebdesign says

Thanks guys, it is actually possible to resize the iframe wich some Javascript getting the height of the element linked. However, these script doesn’t work because of browser security issue when you use an external link as the content of the Iframe.

I will need to find another solution I think.

Cheers

by
by
by
by
by
by