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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using external HTML for a common footer

Status
Not open for further replies.

arabia

Technical User
Nov 4, 2002
8
GB
I want to have the same menu at the bottom of every page beneath a horizontal line. I'm using a proper menu in its own frame at the top of the page, and the menu I want to put at the bottom is not going to go in a frame.

I have used some simple HTML code to put the menu at the bottom of each page, but I'd like to have each page just reference a single document which houses the menu, so that if I want to change one of the links, I only have to do it on the menu.html file, rather than on every page.

Is there an easy way to do this? I'm type of hoping there is a <import=&quot;menu.html> type of tag!

David.
 
Hi mate,

To do this, your server needs to support SSI, and the files that you use this in needs to be named .shtml or whatever extension that your server associates with SSI.

<!--#include virtual=&quot;/menu.html&quot; -->

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
If you don't have access to SSI, you can convert your html file to javascript and then do this:

<script src=&quot;menu.js&quot;></script>

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top