Using JavaScript to Make "Includes"
Tutorial courtesy of the folks at HB Graphics, Guilford CT

Often times a header or footer is repeated on each page of a web site. The benefit of using an "include" is that the code is written once, and subsequent changes are automatically propagated to all pages.
     Includes are easily handled in products such as ColdFusion® or Active Server Pages®. However, if an ISP does not have these capabilities, or a developer does not have these products installed on their computer, using JavaScript is an easy universal solution.

I did however, find the following quirks:
     Navigator 3.x would not function if the footer script contained a <hr> tag.
     IE 3.x would display a JavaScript error message, but showed the footer anyway.

The following is a sample "footer" created using the JavaScript file include_footer.js (shown in an HTML window):


To view the source code click here.
To get a working copy of the code, use "Save As" or
"View Source" from the Source Code window.