WP Iframe or alternative solution

by 4 replies
6
I need help! I am showing an external website on my wordpress site. I can use [iframe].
However, I am looking for a way to have the iframe page automatically resize to the external site's height.
Does anyone know how to do this?

Is there a better way than iframe for this?

I am not a programmer. Here is my site in progress. Right now I'm using popups, but need to change it to whatever the solution is.

Thanks -

site: eastmountainguide.com
example: click "more information about Region Vi" on front page.
instead of pop up, I want that to show on a page with my header on top.
#programming #alternative #iframe #solution
  • I know you don't want to hear this, but it's impossible (with an IFRAME). Because the site is external to your own, you aren't able to read any of its attributes with JavaScript. This is due to browser security.

    The only alternative would be to read the source of the site with a server-side script, and then use your own server as a proxy for all of the resources. You could then use this information in an internal IFRAME on your site, after which the security problem wouldn't block you, or you could skip using an IFRAME and display the content in another manner.

    You won't be able to implement this with a "copy and paste" methodology. It's a tricky solution that requires a lot of work. The easiest thing for you to do is probably just to update each IFRAME manually with the correct height/width.
  • wow an iFrame is a terrible idea. what specifically are you trying to achieve?
    • [1] reply
    • Why is an IFRAME a terrible idea? It sounds to me like she's using it for what they are designed for.
      • [1] reply

Next Topics on Trending Feed

  • 6

    I need help! I am showing an external website on my wordpress site. I can use [iframe]. However, I am looking for a way to have the iframe page automatically resize to the external site's height. Does anyone know how to do this?