32 posts
  • Has been part of the Envato Community for over 6 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 !

2468 posts
  • Has been part of the Envato Community for over 5 years
  • Has sold $100+ on Envato Market
  • Has referred 100+ members
  • Has been a beta tester for an Envato feature
+2 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 6 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

2378 posts Bird is the word..
  • Located in United States
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $500,000+ on Envato Market
  • Has been part of the Envato Community for over 7 years
+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 7 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 6 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

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by