32 posts
  • 6 Years of Membership
  • Affiliate Level 4
  • Author Level 5
  • Canada
+4 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 !

2468 posts
  • 6 Years of Membership
  • Author Level 2
  • Affiliate Level 4
  • Beta Tester
+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
  • 6 Years of Membership
  • Affiliate Level 4
  • Author Level 5
  • Canada
+4 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

2792 posts Bird is the word..
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • United States
+11 more
jonathan01
says

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

86 posts
  • 7 Years of Membership
  • Author Level 2
  • Collector Level 2
  • Exclusive Author
+1 more
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
  • 6 Years of Membership
  • Affiliate Level 4
  • Author Level 5
  • Canada
+4 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