32 posts
  • Bought between 100 and 499 items
  • Canada
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
  • Sold between 10 000 and 50 000 dollars
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 !

2441 posts
  • Has been a member for 5-6 years
  • Exclusive Author
  • Europe
  • Bought between 10 and 49 items
  • Referred between 100 and 199 users
  • Sold between 100 and 1 000 dollars
  • Envato Studio (Microlancer) Beta Tester
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
  • Bought between 100 and 499 items
  • Canada
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
  • Sold between 10 000 and 50 000 dollars
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..
  • Elite Author
  • United States
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Referred between 200 and 499 users
  • Bought between 100 and 499 items
  • Envato Studio (Microlancer) Beta Tester
  • Exclusive Author
+3 more
jonathan01 says

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

86 posts
  • Bought between 10 and 49 items
  • Exclusive Author
  • Has been a member for 6-7 years
  • Sold between 100 and 1 000 dollars
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
  • Bought between 100 and 499 items
  • Canada
  • Exclusive Author
  • Has been a member for 5-6 years
  • Referred between 100 and 199 users
  • Sold between 10 000 and 50 000 dollars
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