开发者

Help in iframe auto size

.Need help guys, I have created a php page named picture.php. In this page I am retrieving a certain image from the database where I used the following codes to display the retrieved image:

header("Content-Type: image/jpeg");
imagejpeg($img);
imagedestroy($img);

.next, I want to 开发者_运维技巧use this page to serve as the source for an image to be displayed in an iframe using the following code:

<a id="various3" href="picture.php" title="<?php echo $info; ?>"><img class="last" src="./images/page11.jpg" /></a>

.various 3 is a jquery class where when i click the tag various 3 will pop-up an Iframe with picture.php inside it. and what i want to do is to set the size of the Iframe based on what is the size of the image from picture.php. help me with this please!


Here is tutorial for you to start from--> Here

You will have to store the resulting values within an array, or two separate variables.

In you iframe, this should work:

<?php
    $valueWidth=500; 
    $valueHeight=250; 
?>

<iframe src="" width="<?= $valueWidth ?>" height="<?= $valueHeight ?>"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜