Insert common markup using Javascript?

I’m very new to XHTML/CSS and have only started to look at Javascript and was wondering if there was anyway of using JS to insert commonly occuring markup in a website I’m designing?

The site is very simple but has a number of pages with a common banner at the top and menu down the right edge which occurs in every page. It seems to me that this is a waste of webspace not to mention making the creation and maintenance of pages slightly more awkward than it need be. Could some JS insert this common markup rather than it having to be present in every page?

I’m aware that I could achieve what I’m after were I to use dynamic technologies but for now I want to keep things simple; plenty of time to learn ASP, PHP or the like in future!

Any help would be greatly appreciated.

While it is possible to use javascript to add common page parts, the process is a lot more complex than if one were to use php or server-side includes.

I have to second Paul’s comment, with the addition that, while the percentage is rather small, there are a significant number of folks who surf the web with JavaScript turned off. Any visitors who come to your site under that condition will quite likely see a broken web page.
Something to consider.

It’s a good point about those few visitors who may have Javascript disabled, I hadn’t thought of that.

If not Javascript then is there any other simple way to accomplish what I’m after? I’m just getting to grips with simple XHTML/CSS without even considering taking the plunge to learn ASP or PHP at the moment!

Frames, but I wouldn’t do that.

Well, since you’re a bit leery about using server-side scripting, you may wish to look into server side includes. you can find a lot of resources here for that

[note]Don’t be offended by the link. it’s the easiest way for me to quickly provide needed information, and it’s rather humorous. :smiley: [/note]