Hi;
I'm new to this forum and to Script Includes. I am trying to create an html website with multiple pages. I am trying to insert a header into each page. I copied a Script Includes from another forums website. This is not working for me. Any help I can get would be appreciated.
Here is what I wrote for my index.html:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Home - Council 9709</title>
<link href="kofc_style.css" type="text/css" rel="stylesheet" />
<script src="js/councilHeader.js"></script>
<style type="text/css">
.auto-style1 {
text-align: center;
vertical-align: central;
margin-bottom: 10px;
}
</style>
</head>
<body>
<!-- Start of Banner/Menu -->
<script>
var foo = new NewInclude();
foo.myFunction();
</script>
<!-- End of Banner/Menu -->
<!-- Start of Content Section (mid-page) -->
HTML content code here
<!-- End of Content Section (mid-page) -->
I have the following in my councilHeader.js file:
// JavaScript source code
var NewInclude = Class.create();
NewInclude.prototype = {
initialize: function () {
},
myFunction: function () {
<table style="width: 100%;">
<tr class="td1 bg_blue center">
<td> <img src="graphics/logo.png" /> </td>
<td> Web site name/banner</td>
<td> <img src="graphics/triangle.jpg" /> </td>
</tr>
<tr>
<td colspan="3">Website Menu</td>
</tr>
</table>
},
type: 'NewInclude'
};