Results 1 to 3 of 3

Thread: A common code HTML called on every webpage?

  1. #1
    Join Date
    Nov 2010
    Posts
    28
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default A common code HTML called on every webpage?

    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?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Look into PHP or another serverside language. That's what they're designed for: generating dynamic HTML pages (often based on templates).
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    May 2010
    Posts
    13
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •