Jump to content

[SOLVED] Page with includes -- breaks when printing in IE


Recommended Posts

I have a website using PHP for including one file for the top of the html on a page, and one for the bottom of the html for each page. They get included into the content page using PHP.

 

Almost all the pages in the site break just below the html coming from the included "top.php" file, but they break ONLY when you try to print them, using IE 6 or 7. Mozilla Firefox seems not to have any problem. I've spent hours trying to figure out why! Anyone see something I don't? Thanks!

 

------------------------------------------

Here's "top.php":

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<meta name="generator" content="Adobe GoLive 6">

<title>Midwest Creation Fellowship</title>

<meta name="keywords" content="creation creationism creationist Genesis Flood Library Noah Noah's Ark Essay Contest">

 

<meta http-equiv="content-language" content="en">

<meta name="author" content="Sharon Brown">

<link href="../general_styles.css" rel="stylesheet">

 

 

 

    <script type="text/javascript"><!--

function preloadImagesCmp006167E060() {

if (document.images) {

over_btn_home = newImage(/*URL*/'../images/btn_home-over.gif');

over_btn_about = newImage(/*URL*/'../images/btn_about-over.gif');

over_btn_ark_exhibit = newImage(/*URL*/'../images/btn_ark_exhibit-over.gif');

over_btn_planetarium = newImage(/*URL*/'../images/btn_planetarium-over.gif');

over_btn_essay_contest = newImage(/*URL*/'../images/btn_essay_contest-over.gif');

over_btn_events = newImage(/*URL*/'../images/btn_events-over.gif');

over_btn_library = newImage(/*URL*/'../images/btn_library-over.gif');

over_btn_speakers = newImage(/*URL*/'../images/btn_speakers-over.gif');

over_btn_newsletter = newImage(/*URL*/'../images/btn_newsletter-over.gif');

over_btn_membership = newImage(/*URL*/'../images/btn_membership-over.gif');

over_btn_contact = newImage(/*URL*/'../images/btn_contact_us-over.gif');

}

}

// --></script>

  </csactiondict>

</csimport>

<csactiondict>

<script type="text/javascript">

<!--

var preloadFlag = false;

function preloadImages() {

if (document.images) {

preloadImagesCmp006167E060();

preloadFlag = true;

}

}

 

// -->

</script>

 

</head>

<body onLoad="preloadImages();" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">

<basefont="Arial, Helvetica, Verdana, sans-serif">

<table width="595" border="0" cellspacing="0" cellpadding="0" align="left">

<!--outer table, 3 rows, 2 cols-->

<tr>

  <td width="104">

    <div align="left"><a href="../html/index.php"><img src="../images/logo.gif" alt="MCF logo" width="104" height="78" hspace="0" vspace="0" border="0" align="left"></a></div>

  </td>

  <td width="491">

    <table border="0" cellspacing="0" cellpadding="0" bgcolor="beige">

      <tr>

        <td><img src="../images/header.gif" alt="Midwest Creation Fellowship, PO Box 952, Wheaton, IL 60189  PH: 847-244-4373" height="78" width="491" align="top" border="0" hspace="0" vspace="0"></td>

      </tr>

    </table>

  </td>

</tr>

<tr height="404">

  <td align="left" valign="top" height="404">

   

      <!--MENU TABLE BELOW -->

      <table width="104" border="0" cellspacing="0" cellpadding="0">

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_home',/*URL*/'../images/btn_home-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_home',/*URL*/'../images/btn_home.gif');return true" href="../html/index.php"><img src="../images/btn_home.gif" alt="Home" name="btn_home" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_about',/*URL*/'../images/btn_about-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_about',/*URL*/'../images/btn_about.gif');return true" href="../html/about.php"><img src="../images/btn_about.gif" alt="About Us" name="btn_about" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_ark_exhibit',/*URL*/'../images/btn_ark_exhibit-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_ark_exhibit',/*URL*/'../images/btn_ark_exhibit.gif');return true" href="../html/arkexhibit.php"><img src="../images/btn_ark_exhibit.gif" alt="Ark Exhibit - Available within 50 miles of Wheaton, Illinois, USA" name="btn_ark_exhibit" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_planetarium',/*URL*/'../images/btn_planetarium-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_planetarium',/*URL*/'../images/btn_planetarium.gif');return true" href="../html/astro_workshop.php"><img src="../images/btn_planetarium.gif" alt="Planetarium Workshop" name="btn_planetarium" height="45" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_essay_contest',/*URL*/'../images/btn_essay_contest-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_essay_contest',/*URL*/'../images/btn_essay_contest.gif');return true" href="../html/essay.php"><img src="../images/btn_essay_contest.gif" alt="Student Essay Contest" name="btn_essay_contest" height="45" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_events',/*URL*/'../images/btn_events-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_events',/*URL*/'../images/btn_events.gif');return true" href="../html/events.php"><img src="../images/btn_events.gif" alt="Events Upcoming" name="btn_events" height="29" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_library',/*URL*/'../images/btn_library-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_library',/*URL*/'../images/btn_library.gif');return true" href="../html/library.php"><img src="../images/btn_library.gif" alt="Library-by-Mail" name="btn_library" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_speakers',/*URL*/'../images/btn_speakers-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_speakers',/*URL*/'../images/btn_speakers.gif');return true" href="../html/speakers.php"><img src="../images/btn_speakers.gif" alt="Speakers Bureau" name="btn_speakers" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_newsletter',/*URL*/'../images/btn_newsletter-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_newsletter',/*URL*/'../images/btn_newsletter.gif');return true" href="../html/newsletter.php"><img src="../images/btn_newsletter.gif" alt="Newsletter" name="btn_newsletter" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_membership',/*URL*/'../images/btn_membership-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_membership',/*URL*/'../images/btn_membership.gif');return true" href="../html/membership.php"><img src="../images/btn_membership.gif" alt="Membership" name="btn_membership" height="30" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td><a onMouseOver="changeImages( /*CMP*/'btn_contact',/*URL*/'../images/btn_contact_us-over.gif');return true" onMouseOut="changeImages( /*CMP*/'btn_contact',/*URL*/'../images/btn_contact_us.gif');return true" href="../html/contactus.php"><img src="../images/btn_contact_us.gif" alt="Contact Us" name="btn_contact" height="56" width="104" border="0"></a></td>

        </tr>

        <tr>

          <td align="left" valign="top">

 

          <!-- PHP below puts date updated below the menu 2/16/07.-->

<? include("date_file_modif.php"); ?>

 

          </td>

        </tr>

      </table>

      <!--END MENU TABLE-->

    </csobj>

  </td>

  <td align="left" valign="top" width="491" height="404"> <!-- #BeginEditable "ContentTop" -->

 

Here's "bottom.html":

</td>

</tr>

 

<!--THIS IS THE LAST TR ON THE PAGE, BELONGS TO OUTER TABLE-->

<tr>

<td height="12" colspan="2" valign="top" bgcolor="#3333cc">

<div align="center">

<font size="2" color="white"><b>Problems with this page? Suggestions? <a href="../html/contactus.php"><font color="white">Contact us</font></a></b></font>

</div>

</td>

</tr>

<tr>

<td colspan="2"><center><font size="1">Copyright 2003-2006, Midwest Creation Fellowship</font></center>

  </td>

</tr>

</table>

</body>

</html>

 

When I put those two files together, they print fine. (Whoopee.) When I pull them into a new page with minimal content, IT prints fine. When I pull them into a regular content page, the problem appears.

--------------------------------------------------

Here's a sample, WITH the includes:

<?php include("../includes/top.php"); ?>

 

<table width="490" border="0" cellspacing="0" cellpadding="3" align="left" bordercolor="#000000">

<tr>

<td width="490"><a href="events.html"><img src="../images/events_header.gif" alt="Events" width="70" align="bottom" border="0" hspace="0" vspace="0"></a><br clear="left">

 

<p><b><font size="2">April 28-29, 2006 (Friday night-Saturday): Outdoor Work Weekend at <a href="http://timber-lee.com/"> Timber-lee Christian Conference Center</a>. </font></b></p>

 

<p><img src="../images/Boys-Working-350x240.jpg" alt="Prior work weekend" width="350" height="240" align="right" border="0" hspace="5" vspace="3">

 

For the past few years, MCF has been spending a weekend in April helping Camp Timber-lee get ready for the summer camping season. We arrive Friday evening, have a snack and fellowship a while, sleep in cabins, and spend Saturday doing various tasks that Timber-lee needs done. Our efforts benefit the <b>Science Education Center</b>, which has a strong Six Day Creation emphasis, including a <i><b>Seven Days of Creation</b></i> exhibit</b>, occupying seven rooms. </p>

 

<p>Besides helping Timber-lee, this would give you the chance to check out the facilities before you commit to sending a family member to one of Timber-lee's camps or events. (Teaching events are year-around!)</p>

 

<p><b>Location: </b>N8705 Scout Road, East Troy, Wisconsin 53120.</p>

 

<p><font color="red"><b>You need to register for this event</b></font>, so please call Walt Sivertsen at <b>847-244-4373</b>. Let us know of any special skills or interests you have that might be useful, too! The emphasis this year will be outdoor habitat restoration. If the weather is poor, we'll do indoor work.</p>

 

<p><b>Bring:</b> bedding, pillow, towel, soap, flashlight, personal toiletries and maybe a camera with fresh battery and film. Please <b>do not bring children too young to participate</b> in the work. Maps: <a href="http://www.timber-lee.com/about/map/index.html" target="_blank">http://www.timber-lee.com/about/map/index.html</a>.</p>

 

<p><b>Schedule:</b> Friday: If you are staying overnight, plan to arrive between 7:00 - 8:00 p.m.</p>

 

<p>Saturday: Breakfast, lunch and (if you choose to stay) supper are in the Redwood Commons. We work during the morning and early afternoon, and usually have a science program after lunch. Most people go home before supper.</p>

 

<p><b>Cost</b>: Since we come to work, <b>no charge! Lodging and meals are free</b>!</p>

</td>

</tr>

</table>

<!-- #EndEditable -->

 

<?php include("../includes/bottom.html"); ?>

--------------------------------------------------------------------

Thanks for any help anyone can give!

 

Thank you!

 

It turned out that an errant <basefont> tag was the problem! Someone pointed out that I had

 

<basefont="Arial, Helvetica, Verdana, sans-serif">

 

which should have been

 

<basefont face="Arial, Helvetica, Verdana, sans-serif">

 

When corrected, that alone fixed the printing problem.

 

But I really appreciated your working on this!

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.