Genadinik
Genadinik

Reputation: 18639

Dynamically controlling IFrame size

I have an IFrame that I am trying to make with dynamically controlled height and width, but it does not seem to be working.

For some reason, the IFrame just adds a scrolling bar when I want it to become bigger. But how do I make the IFrame area itself become bigger?

Here is my current test page: http://www.comehike.com/outdoors/widget.php?type=hike&hike_id=108&width=200&height=450

You see the height and width params I added to the URL. They are meant to control the IFrame, but all they seem to do is add/remove the scrolling bar.

FYI, the google map inside is also using the height and width. I had meant the map and IFrame to increase and decrease in size in the same proportions. How can I do that?

Thanks, Alex

Upvotes: 0

Views: 649

Answers (1)

Genadinik
Genadinik

Reputation: 18639

Something like this in PHP worked.

style="width:'.$width. 'px;height:'.$height.'px" 

Upvotes: 1

Related Questions