...

View Full Version : serverside include not loading proper content



canadianjameson
08-20-2007, 10:50 PM
Heyhey,

I posted this in the PHP forums and I was shunned for it... I don't know where else to post this so i'm putting it here and hopefully an admin can move it if need be.

I'm trying to implement server-side includes for the first time and for some reason after the first page has loaded, whenever I click a link it only doesn't open any of the includes but only the content of the page (let me give you and example)

if you go to www.enviromark.ca/head/indexInclude.htm it will load, however if you click on the first button on either the right or left navigations, it skips over any subsequent include calls

indexInclude.htm is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Testing</title>
<!--#include file="includes/head.htm" -->
</head>

<body onload="zxcInitImages('logoC','links_BW'); setTimeout(assignMouseOver,5000);">
<div id="pageContainer">
<!--#include file="includes/topBar.htm" -->
<!--#include file="includes/leftNav.htm" -->
<div class="clear"></div>
<!--#include file="includes/rightNav.htm" -->
<div id="contentarea"></div>
</div>
<!-- Put this script element at the end of the body element. -->
<script type="text/javascript" src="js/emailDisplay.js"></script>
</body>
</html>

and the left and right navs are:

<div id="bottomText"><img src="images/logoButtons/bottom_text.gif"></div>
<img src="images/logoButtons/titles/blank_title.gif" id="blank_title" name="title_display">
<div id="links_BW" onclick="mClear(); zxcOnceClick('nav_helper')">
<img name="infoButton" src="images/logoButtons/info_BW.gif" onclick="email('info'); location.href='infoInclude.htm'" onmouseover="on1();" onmouseout="off1();">
<img name="YPPButton" src="images/logoButtons/YPP_BW.gif" onclick="email('YPP'); location.href='YPPInclude.htm'" onmouseover="on2();" onmouseout="off2();">
<img name="socialButton" src="images/logoButtons/social_BW.gif" onclick="email('social'); location.href='socialInclude.htm'" onmouseover="on3();" onmouseout="off3();">
<img name="healthButton" src="images/logoButtons/health_BW.gif" onclick="email('medical'); location.href='medicalInclude.htm'" onmouseover="on4();" onmouseout="off4();">
<img name="legalButton" src="images/logoButtons/legal_BW.gif" onclick="email('legal');" onmouseover="on5();" onmouseout="off5();">
<img name="J2KButton" src="images/logoButtons/J2K_BW.gif" onclick="email('J2K');" onmouseover="on6();" onmouseout="off6();">
<img name="streetworkButton" src="images/logoButtons/streetwork_BW.gif" onclick="email('streetwork');" onmouseover="on7();" onmouseout="off7();">
</div>
<img src="images/nav_helper.jpg" id="nav_helper">
and
<div id="navcontainer" onclick="zxcResetImages('links_BW'); zxcOnceClick('nav_helper')">
<ul id="navlist">
<li><a href="infoInclude.htm" id="about" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">About Us</a></li>
<li><a href="YPPInclude.htm" id="people" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">People:<br>Past and Present</a></li>
<li><a href="socialInclude.htm" id="media" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">Media / Press</a></li>
<li><a href="medicalInclude.htm" id="getinvolded" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">Get Involved</a></li>
<li><a id="donate" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">Donate</a></li>
<li><a id="forums" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">Forums</a></li>
<li><a id="extraLinks" class="default" onmouseover="mOver(this)" onmouseout="mOut(this)" onclick="mClick(this);">Links</a></li>
</ul>
</div>
<div id="emailSection"></div>
and finally the link you are opening is

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Testing</title>
<link rel="stylesheet" href="css/info.css" type="text/css">
<!--#include file="includes/head.htm" -->

</head>

<body onload="zxcInitImages('logoC','links_BW'); setTimeout(assignMouseOver,5000);">
<div id="pageContainer">
<!--#include file="includes/topBar.htm" -->
<!--#include file="includes/leftNav.htm" -->
<div class="clear"></div>
<!--#include file="includes/rightNav.htm" -->
<div id="contentarea">
<div id="pageHolder" onmouseover="zxcInitBorderGrp('pageHolder','border-Bottom','A',1000,2000,'#FFFFFF','#000000','solid #000000 1px')">
<div id="linksInfo">
<a href="#referralInfo" onclick="zxcToggle('referralInfo',1,0); zxcBorder('border-Top',this,1000,'#FFFFFF','#000000','solid black 1px',1,0); return false;">Referals</a>
<a href="#whereWhenInfo" onclick="zxcToggle('whereWhenInfo',2,0); zxcBorder('border-Top',this,1000,'#FFFFFF','#000000','solid black 1px',2,0); return false">Hours and Location</a>
<a href="#calendarsInfo" onclick="zxcToggle('calendarsInfo',3,0); zxcBorder('border-Top',this,1000,'#FFFFFF','#000000','solid black 1px',3,0); return false">Calendars</a>
</div>
<div id="referralInfo">
<ul>
<li>If we can't help you at Head & Hands through one of our various services, we will try to find someone who can. Don't be afraid to give us a phone call at 514.481.0277, or send us an e-mail. Also, check our Links section to check out websites of other resources in the Montreal area.</li>
</ul>
</div>
<div id="whereWhenInfo">
<div id="locationInfo">
Head and Hands<br>
5833 Sherbrooke Ouest<br>
Montr&eacute;al, Qu&eacute;bec<br>
C.P. 446, Succ. N-D-G.<br>
Montr&eacute;al, Qu&eacute;bec<br>
H4A 3P8<br>
<br>
Tel/T&eacute;l : 514.481.0277<br>
Fax/T&eacute;l&eacute;c : 514.481.2336
</div>
<div id="hoursInfo">
Monday 10AM - 9:30PM<br>
Tuesday 10AM - 9:30PM<br>
Wednesday 10AM - 9:30PM<br>
Thursday 10AM - 9:30PM<br>
Friday 10AM - 5:00PM<br>
Saturday CLOSED<br>
Sunday CLOSED
</div>
</div>
<div id="calendarsInfo">
<ul>
<li>J2K Calendar: http://headandhands.ca/jeunessecalendar.htm</li>
<li>Medical Clinic Calendar: http://headandhands.ca/medicalcalendar.htm</li>
<li>YPP Calendar: http://headandhands.ca/yppcalendar.htm</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Put this script element at the end of the body element. -->
<script type="text/javascript" src="js/emailDisplay.js"></script>
</body>
</html>

What Have I Missed?

2reikis
08-21-2007, 06:41 AM
I'm getting an error.... line 8, char 1, Object expected. Are you still working on this?

canadianjameson
08-22-2007, 03:21 PM
I am :)

I apparently have to name my files .shtml???

lemme go do that, but I still need help on this :o



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum