">
Domain Registration : Discount Domain Pricing : Website and Domain Hosting : Frontpage 2000 Hosting : Website Development and Promotion : Secure E-Commerce : Shopping Cart Software : Linux and Windows NT : Graphic Design : Free Email Services : Fast Servers : Low Cost!


RESOURCES




There are many ways of putting a header and footer on an HTML page, but this is one of the easiest. Once you have set up header.js and footer.js, all you need to do to include a header is put this code at the top:

    <script language="JavaScript" src="header.js"></script>

And all you need to do to include a footer is put this code at the bottom:

    <script language="JavaScript" src="footer.js"></script>

WARNING 1!!! Only Netscape 3 and higher and MSIE 4 and higher support external scripts (usage of the script src).

WARNING 2!!! In order to use the .js extension it must me enabled in the Web Server software of the machine where it is operating. This means that you must know how to map files with the .js extension to a MIME type of:

    application/x-javascript

Also note that the .js code is not secure just as a javascript is not. It is open to all to see with a browser just as if they were looking at an embeded script in an HTML file.

Click the button below to spawn a window which contains a sample page with a header and footer included.

Here is the code for the script. First is an example page in your web site:

<html> <body>
<script language="JavaScript" src="header.js"></script>

<!-- BODY TEXT GOES HERE -->

<script language="JavaScript" src="footer.js"></script>
</body></html>


This is the entire header.js document:

    var header="WHATEVER YOUR HEADER IS.<BR><HR>"; document.write(header);


And the entire footer.js document:

    var footer="<BR><HR>WHATEVER YOUR FOOTER IS."; document.write(footer);











Copyright © 1995-2003 Sidetrips™ Internet Services, Inc. All rights reserved.

Reproduction in whole or in part in any form or medium without express
written permission of Sidetrips Internet Services, Inc. is prohibited.

sidetrips.com™, hostserver.com™, registera.com™, htmlshop.com™,
and associated domains are trademarks of Sidetrips™ Internet Service, Inc.

Privacy Policy | Acceptable Use Policy | Terms of Service