WP Iframe or alternative solution

by Tess D
4 replies
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.
#alternative #iframe #solution
  • Profile picture of the author wayfarer
    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.
    Signature
    I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
    {{ DiscussionBoard.errors[3452982].message }}
  • Profile picture of the author Peter01
    wow an iFrame is a terrible idea. what specifically are you trying to achieve?
    {{ DiscussionBoard.errors[3453313].message }}
    • Profile picture of the author wayfarer
      Originally Posted by Peter01 View Post

      wow an iFrame is a terrible idea. what specifically are you trying to achieve?
      Why is an IFRAME a terrible idea? It sounds to me like she's using it for what they are designed for.
      Signature
      I build web things, server things. I help build the startup Veenome. | Remote Programming Jobs
      {{ DiscussionBoard.errors[3453630].message }}
      • Profile picture of the author Tess D
        Thanks for the help with this. I am afraid that Wayfarer is correct. I talked the client into skipping the whole iframe idea, and just open them in with _target commands.
        {{ DiscussionBoard.errors[3465007].message }}

Trending Topics