need help for php programming :)

princeoo7

On a Journey called Life :P
Skilled
ok friends i need to know how to make the iframe height auto, flexible etc.......

means the width should be fixed but only the height should be flexible according to the php/html going to be displayed in that iframe.

i am using adoble dreamwaver cs5 for coding ....

plz help me out .....

thanks in advance to all :)
 
yes have tried that + also tried auto and sum scripts from net which googled.

--- Updated Post - Automerged ---

nothing is working :(

--- Updated Post - Automerged ---

i have use the iframe code as followed :

<iframe align="middle" src="HOME.php" scrolling="no" name="iframe" height="100%" width="70%"></iframe>

--- Updated Post - Automerged ---

as right now i was experimenting on the height problem, i found that the "%" method is working like the "px" method.

if i put the value 1000% instead of 100% then the whole page is seen and a addition space is also their.
 
princeoo7 said:
i have use the iframe code as followed :

<iframe align="middle" src="HOME.php" scrolling="no" name="iframe" height="100%" width="70%"></iframe>
I think, if you want height as flexible, you may not want to set scrolling="no", because this setting can hamper the height setting.
 
i have tried the scrolling to auto but the iframe stay the same just it gets the scroller :(

and i want the iframe to display the whole page according to what ever the size may be ( big or small ) :)

--- Updated Post - Automerged ---

ok just now i have tried some thing different which actually didn't solve the problem but now the iframe is not giving border which i also wanted :D

the code i have used are as followed :

<iframe src="Home.php" style="border: medium none; overflow: hidden; width: 70%; height: 100%;" allowtransparency="true" frameborder="0" scrolling="no"></iframe>
see if any one can make it work and get the iframe size to auto :)
 
I think I'm actually missing your point, can you please post a screenshot and describe what you don't want??

Because as far I know iframe doesn't crop anything, if it doesn't fit to browser size it'll add scrollbar, which it's doing, I believe. So what you actually want??
 
i just want the ifame to load the whole size of the web page which is going to be displayed in it :)

and as every web page as its own different size, iframe should adjust itself which is in the main home page :)

but that's not happening and the height is fixed and the whole web page is not displayed , only the starting part of it is displayed :mad:

--- Updated Post - Automerged ---

i just want the ifame to load the whole size of the web page which is going to be displayed in it :)

and as every web page as its own different size, iframe should adjust itself which is in the main home page :)

but that's not happening and the height is fixed and the whole web page is not displayed , only the starting part of it is displayed :mad:
 
Iframes are annoying. Height=100% wont work. To autosize you will have to use javascript based solutions. But if you do use a javascript solution, remember that for some JS solutions iframe location has to be in the same domain as the main site.

Example 1
Main site - abc.com
iFrame - abc.com/iframe

All good
Example 2
Main Site - abc.com
iFrame - iframe.abc.com

Wont work
 
The Script for Dave Brondsema's Blog - 100% height iframe didn't worked, plz see is some thing wrong with it :/

<iframe id="frame" src="Home.php" style="border: medium none; overflow: hidden; width: 70%; height: 100%;" allowtransparency="true" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" name="iframe"></iframe>

<script type="text/javascript">

function resizeIframe() {

var height = document.documentElement.clientHeight;

height -= document.getElementById('frame').offsetTop;



// not sure how to get this dynamically

height -= 20; /* whatever you set your body bottom margin/padding to be */



document.getElementById('frame').style.height = height +"px";



};

document.getElementById('frame').onload = resizeIframe;

window.onresize = resizeIframe;

</script>

--- Updated Post - Automerged ---

ok the second option by krishnandu : SonSpring | jQuery iFrame Sizing

its working but still some of the iframe are not getting the script effect and have the same problem with it , so what to do with that ?????
 
princeoo7 said:
The Script for Dave Brondsema's Blog - 100% height iframe didn't worked, plz see is some thing wrong with it :/

<iframe id="frame" src="Home.php" style="border: medium none; overflow: hidden; width: 70%; height: 100%;" allowtransparency="true" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" name="iframe"></iframe>

<script type="text/javascript">

function resizeIframe() {

var height = document.documentElement.clientHeight;

height -= document.getElementById('frame').offsetTop;



// not sure how to get this dynamically

height -= 20; /* whatever you set your body bottom margin/padding to be */



document.getElementById('frame').style.height = height +"px";



};

document.getElementById('frame').onload = resizeIframe;

window.onresize = resizeIframe;

</script>

--- Updated Post - Automerged ---

ok the second option by krishnandu : SonSpring | jQuery iFrame Sizing

its working but still some of the iframe are not getting the script effect and have the same problem with it , so what to do with that ?????
Well, in this.contentWindow.document.body.offsetHeight + 'px'; instead of "px" try "%"

Can you post a screenshot where actually the problem is.
 
OK HERE WE GO :

IMAGES :

1.
30lpkbc.png


LINK : http://i56.tinypic.com/30lpkbc.png

2.
5e8go5.png


LINK : http://i55.tinypic.com/5e8go5.png

--- Updated Post - Automerged ---

Guys i think i just got the right problem with the remaining pages which are not fully loading :)

the pages which are fully loading content codes

:-

<div style="text-align: left;">

<table cellpadding="0" cellspacing="0" width="100%">

<tbody><tr>

<td align="center" width="33%">


<a title="abc" href="http://www.abc.com/">

show_image_in_imgtag_002.jpg


abc </a>

abc:<span class="abc"> abc </span>abc</span>
but the web page which is not fully loading has codes

:-

<td>

<div class="greyband3">abc</div>

<div style="float: left; width: 100%;"><a title="abc" href="abc">

show_image_in_imgtag_002.jpg
</a> </div>

<br style="clear: both;">

<a title="abc" href=abc>[...]</a>

<br style="clear: both;">

</td>

i can't sit and change all the web pages and the above one was just an experiment which i did and got it right :)

means every problem now is related to the table i am using the the web pages and so now what to do :/
 
Back
Top