Log in

View Full Version : A common code HTML called on every webpage?



Fighterfox
12-09-2010, 12:41 PM
I'm creating a code generator based on a template for non-web-guys. I want them to be able to enter text in pure text files, which I will incorporate into the web page (right now, via the JavaScript document.write command). But in the case of disabled JavaScript, the whole page goes caput.

Is there any way to call a link to a common HTML file? Can I insert text files into an HTML document? Also, suppose I have a navigation bar on 250 web pages and I decide I want to add an item. Can I just create one universal navigation bar code and refer to it in my HTML document, without using JavaScript?

djr33
12-09-2010, 08:59 PM
Look into PHP or another serverside language. That's what they're designed for: generating dynamic HTML pages (often based on templates).

zip222
12-21-2010, 05:15 PM
PHP will do exactly what you're looking for...

<?php include "filename" ?>

Same with a lot of other server-side languages. It's likely your web host supports one of them.