2
votes

So I automatically resize my iframe based on content height as follows:

<a href="#" onClick="sc.style.height='200px'; window.location.reload(); window.open('19.htm', 'middle'); return false;">Link1</a>
<iframe src="19.htm" name="middle"  id="middle" scrolling="no"></iframe>

However, I use my methods of resizing body haven't worked...

I try the above code to automatically resize the body height so the iframe fit easily in the page because different pages content have different height

Any suggestions?

1
What did you try and what didn't work? - Sergio Tulentsev
actually i am new in these type of coding and my English is also weak sorry :( - Danish Iqbal
Yeah, so? What did you try so far? - Sergio Tulentsev
@SergeiTulentsev i edited my question and my dear friend i believe on this try again and again until you achieve success - Danish Iqbal
you want to change to body height of the main page, or the iframe? or do you want to change the size of the iframe itself? - MrGlass

1 Answers

0
votes

The following link contains the info you need: Control iframe height with jQuery

It's worth using jQuery to make the dynamic changes you'll need. In particular...

If you've not used jQuery before now's the time to start. It makes life much easier.