Auto iFrame height?

RiemenDesign
RiemenDesign used Ask the Experts™
on
Hello -

I need to have my iframe extend the length of the source file.

I also would like no scrollbars.

How can I do this?

Here is the code...
<?php
//echo "root is ".$_SERVER["DOCUMENT_ROOT"];
define ( 'INCLUDES', $_SERVER["DOCUMENT_ROOT"].'/includes/' );
define ( 'TEMPLATES', $_SERVER["DOCUMENT_ROOT"].'/templates/');
 
require_once(INCLUDES . 'config.inc.php');
require_once(INCLUDES . 'mysql.class.php');
require_once(INCLUDES . 'template.class.php');
require_once(INCLUDES . 'functions.php');
 
$mysql = new MySQL($mysqlServer, $mysqlUser, $mysqlPass, $mysqlDatabase);
 
//determine subsection
if(isset($_GET['subsection'])){
	$subsection = $_GET['subsection'];
}
else {
	$subsection = '';
}
 
$secondaryPage = new template(TEMPLATES . 'secondary.tpl.php');
$secondaryPage->set('pageTitle', 'John F. Ke nnedy Cat holi c H igh Scho  ol -- Home of the Ga  els');
// header images 
$headerImage = $mysql->GetObject($mysql->Query("SELECT imageName FROM headers ORDER BY RAND()"));
$secondaryPage->set('headerImage', $headerImagesURL.$headerImage->imageName);
 
// articles
$secondaryPage->set('topMenu', GetTopMenu());
$secondaryPage->set('sectionName', 'Photo Gallery');
//$secondaryPage->set('leftMenu', BuildLeftMenu('alumni', $subsection, true));
 
if($subsection != ''){
	$pageData = GetPageData('alumni', $subsection);
}
else {
	$pageData = GetPageData('alumni', GetDefaultPage('alumni'));
}
 
 
 
 
 
 
 
 
//
// +---------------------------------------------------------------------------+
// |  F O T O P A N E L                                 |
// +---------------------------------------------------------------------------+
// | Copyright (c) 2007 fotocrib.com                                         | 
// | All rights reserved.                                                      |
// |                                                                           |
// | Redistribution and use in source and binary forms, with or without        |
// | modification, are permitted provided that the following conditions        |
// | are met:                                                                  |
// |                                                                           |
// | 1. Redistributions of source code must retain the above copyright         |
// |    notice, this list of conditions and the following disclaimer.          |
// | 2. Redistributions in binary form must reproduce the above copyright      |
// |    notice, this list of conditions and the following disclaimer in the    |
// |    documentation and/or other materials provided with the distribution.   |
// |                                                                           |
// | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR      |
// | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
// | OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.   |
// | IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,          |
// | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT  |
// | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
// | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY     |
// | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT       |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF  |
// | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.         |
// +---------------------------------------------------------------------------+
// | For help, contact webmaster@fotocrib.com          |
// +---------------------------------------------------------------------------+
//
/**
  * @author Martin Okorodudu
 */
 
 
include_once 'display.php';
 
$albums = getAlbums();
$html = getPublicAlbumsHTML($albums);
 
$data= '
 
 
<link rel="stylesheet" type="text/css" id="style1" href="style.css">
<script type="text/javascript" src="fotoboard.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="autoHeight.js"></script>
 
 
 
 
 
<br />
<center>
 
<div style="margin-left: -20px;">
<iframe src="http://www.kenne dycath olic.org/photos/index.php" width="100%"
height="100%" name="youriframe" frameborder="1" vspace="0" hspace="0"
marginwidth="0" marginheight="0" scrolling="yes" noresize></iframe>
</div>
 
<div id="container">	<br /><h3>WELCOME TO MY GALLERY</h3> <br />
<span>
		<input type="button" class="options" value="albums" onClick="showPublicAlbums()" />
</span>
<div id="main">' . $html . '</div>
	
	<br /><br />
 
	<span id="info"></span>
	
	<br /><br />
	</div>
 
<!-- <div class="cbottom"><img src="media/bottom.png" /></div><br /><br />
<a href="http://www.fotocrib.com"><img class="ad" src="media/logo.png" border="0" /></a> -->
<a href="../alumni/"> << Back</a>
</center>
 
';
 
 
 
 
 
 
 
$secondaryPage->set('pageContent', $data);
 
$secondaryPage->write();
?>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
This iframe will not have scroll bars and will be the height of the entire screen:


<iframe scrolling=no height=100% src="myurl.html"></iframe>

Open in new window

Commented:
I'm not sure what you Autoheight script is for, at first I thought it might be exactly for that, but being unsure here's what I know works having delt with that in the past

first I'd use this js script.

It can be found here:  http://www.phpmix.org/projects/widgets/javascript/dynifs

now copy that into the folder called js

now on line 94 insert:  <script type="text/javascript" src="js/dynifs.js"></script>

now change the iframe lines with this:

<iframe name="youriframe" id="youriframe" onload="DYNIFS.resize('youriframe') scrolling="no" src="http://www.kenne dycath olic.org/photos/index.php" width="100%" height="100%"  frameborder="1" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="yes" noresize></iframe>


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial