View Full Version : JavaScript Headers

05-06-2007, 05:42 AM
Hello, I am new to programming and have a question. I'm sure the answer is already in a post somewhere, but I haven't found it so far if it is.

I am using Windows XP on a PC with Microsoft Visual Web Developer 2005. I would like to make a JavaScript header so that each pages' header will be uniform.

I can find scripts for the images and text, clocks, etc. that I may want to include in the header, but cannot find how to link each individual page to the same header. I've tried various things, but nothing seems to work. I'm not sure what I'm doing wrong.

If someone would please either direct me to where I can find this information or give me some code to refer to the JavaScript file in the "head" of each page, it would be appreciated very much.



05-06-2007, 09:31 AM
This is not what Javascript is for. You should use a server-side language for this sort of things, since otherwise people without Javascript enabled will be unable to see your header.

05-06-2007, 02:12 PM
With MS FP and front page extensions enabled on your server, there is a thing called shared borders for that. Perhaps this (or something like it - Dynamic Web Templates?) is available in Microsoft Visual Web Developer 2005. If so that might be the easiest way. It is a server side method like Twey says, but has the advantage (if included in your design program) of being easier for the novice.