0

I've tried out several solutions and jQuery plugins to solve this issue but for some reason they're not working for my website.

Perhaps someone could take a look what is preventing my iFrame height from being set dynamically: http://thestrand.spin-demo.com/booking

I currently have an autoHeight jquery plugin there that gets the height of the iFrame with the class "autoHeight" and sets the height of the iFrame based on the total height of the content.

For some reason it's only setting the height to 169px.

imjp
  • 6,495
  • 10
  • 48
  • 58
  • is the initial content loaded into the iframe subsequently swapped out for something else? It looks like your height is being set by the initial content, which is then swapped out for something larger? A bit of code or more context would be helpful. – chris Feb 01 '12 at 17:32
  • 2
    see http://stackoverflow.com/questions/8855586/expand-div-vertically-that-contains-an-iframe – calebds Feb 01 '12 at 17:35
  • Thanks. I guess I would just have to set a static height for the iFrame. – imjp Feb 01 '12 at 17:38

1 Answers1

3

You wont be able to do this for an iframe on another domain because of the same origin policy of the browser.

Sam Greenhalgh
  • 5,952
  • 21
  • 37
  • You should be able to access domains that share the same right-hand fragment of the domain if you set the same document.domain on both pages. Eg. on foo.example.com and www.example.com – Sam Greenhalgh Feb 01 '12 at 17:49