Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

#include files +html..newcomer and very lost :-(

Status
Not open for further replies.

googleman

Programmer
Aug 28, 2003
5
IE
Hi there,

Your forum has been recommended to me by a friend so I was wondering if you could help me...

I wish to store the LHS menu in a file called leftnav.htm and call it from several pages.This is not working however.Could you please tell me what I'm doing wrong?

leftnav.htm
<!--Sets the links for the LHS of the page -->

<table valign=center height =&quot;354&quot; width=&quot;162&quot;>
<td width=&quot;154&quot; align=center height=&quot;1&quot; bgcolor=&quot;#CCCCEE&quot;><span class=&quot;sub&quot;><b>Menu</b></span></td>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot; class=&quot;norm&quot; >JobSheets <br> <img src=&quot;jobsheet.jpg&quot; border=0 height=40 name=&quot;jsheet_img&quot;></a></td>
</tr>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot; class=&quot;norm&quot; >Site Manuals <br> <img src=&quot;sitemanual.gif&quot; border=0 height=40 name=&quot;smanual_img&quot;></a></td>
</tr>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot; class=&quot;norm&quot; target=&quot;_top&quot;>Procedures <br><img src= &quot;procedures2.jpg&quot; border=0 height=50 name=&quot;proc_img&quot;></a></td>
</tr>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot; class=&quot;norm&quot;> Disaster Recovery <br><img src=&quot;disaster3.jpg&quot; border=0 height=40 name=&quot;disaster_img&quot;></a></td>
</tr>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot;intro.htm&quot;>Business Continuity <br><img src=&quot;business5.jpg&quot; border=0 height=40 name=&quot;bus_img&quot;></a></td>
</tr>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot;intro.htm&quot;>Back Up <br><img src=&quot;backup.jpg&quot; border=0 height=35 name=&quot;backup_img&quot;></a></td>
</tr>

<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot; class=&quot;norm&quot;>Security <br><img src= &quot;padlock2.jpg&quot; border=0 height=40 name=&quot;sec_img&quot;></a></td>
</tr>
<tr>
<td width=&quot;154&quot; bgcolor=&quot;#AAAACC&quot; align=center height=&quot;48&quot;><a href=&quot; class=&quot;norm&quot;>Help <br><img src=&quot;help2.jpg&quot; border=0 height=50 name=&quot;help_img&quot;></a></td>
</tr>

</table>

One of the pages I wish to call leftnav from is Index.htm

<html>
<head>

<!-- This file contains the tesxt design template which will be displayed on each page -->
<LINK REL=StyleSheet HREF=&quot;stylesheet.css&quot; TYPE=&quot;text/css&quot;>
</head>

<body leftmargin=&quot;0&quot; topmargin=&quot;0&quot; bottommargin=&quot;0&quot; rightmargin=&quot;0&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot;>
<table width=&quot;724&quot; height=&quot;497&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;>
<tr bgcolor=&quot;#A8CCCC&quot; >

<!-- Inserts the Group logo on the LHS of the page -->
<td width=&quot;183&quot; align=&quot;left&quot; height=&quot;85&quot;>
<img src=&quot;Group.gif&quot; width=&quot;167&quot; height=&quot;67&quot;> &nbsp;</td>

<!-- inserts the logo on the RHS of the page -->
<td valign=&quot;top&quot; align=&quot;right&quot; height=&quot;85&quot; width=&quot;537&quot;>
<img src=&quot;logo.gif&quot; width=&quot;122&quot; height=&quot;57&quot;>&nbsp;</td>
</tr>
<tr height=&quot;100%&quot;>
<td width=&quot;183&quot; valign=&quot;top&quot; bgcolor=&quot;#A8CCCC&quot; height=&quot;412&quot;>
&nbsp;

<!-- Places Left nav file here. Left nav is stored in leftnav.asp. Use asp include
Leftnav.asp will be a file that contains a table with the nav links. -->
<!--#include file=&quot;leftnav.htm&quot;-->

Would appreciate your help thanks!
 
When you say &quot;it's not working&quot;, what exactly do you mean? Are you getting an SSI error message (something like &quot;Error processing this directive&quot;, I forget the exact wording), or is the SSI not happening at all? (You can check for this by doing a &quot;View Source&quot;, if you see the <!--#include command your server is ignoring the SSI).

I suspect the latter, probably because your host is configured to only apply SSI to particular file extensions. Try renaming your file to &quot;index.shtml&quot; and see what happens. Also be aware that some hosts (including most free ones) don't allow SSI at all. See faq253-3309 and faq253-2000 for more help.


-- Chris Hunt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top