0

I have an iframe on a responsive site that is a booking form from another website. Unfortunately I can't set explicit heights on the iframe as there are dropdowns on the from which change the height (which creates scrollbars on the iframe).

So my only fix so far is to make the height way taller than it the actual booking form, so if the form increases in height it doesn't create the scrollbars. Is there any method whereby the iframe changes height dependant on the height of the form?

I trawled everywhere but am yet to find a solution!

Thanks.

user2144363
  • 37
  • 2
  • 5
  • Did none of these work [SO duplicate question](http://stackoverflow.com/questions/819416/adjust-width-height-of-iframe-to-fit-with-content-in-it) – Billy Nov 21 '14 at 20:45
  • You can only achieve that if the other site that you are loading the document in the iframe from actively supports you in doing so; otherwise the Same Origin Policy will prevent you from getting any information about the document inside the iframe. – CBroe Nov 22 '14 at 00:44

1 Answers1

-1

I think you have to write a javascript in the document in iframe, which will change the height of the iframe in the parent document when some event occur, like the drop down menu showing

vinsa
  • 1,132
  • 12
  • 25