Forum Home
Press F1
 
Thread ID: 22417 2002-07-20 22:05:00 html assistance Shroeder (492) Press F1
Post ID Timestamp Content User
63899 2002-07-20 22:05:00 Have looked all over but can't seem to locate this one...

I want to have the same text at the bottom of each page but only have to change it in one location (as it will change regularly)

IIRC, I can put it in a separate html file? and somehow link it across???

Can anyone point me in the right direction for the code required (or advise a better method)

When replying, please note I am not using an html editor, just coding direct into a text file.

Thanks
Shroeder (492)
63900 2002-07-20 22:16:00 You could use frames then you only have to change the text in one html file. All pages that you want it on will have to have to have some code which puts the html frame on its page.

Check out this link on how to create frames.

Lissa Explains it All: Frames Tutorial (www.lissaexplains.com)
Sam H (525)
63901 2002-07-20 22:55:00 Why don't you make a .gif image file with the desired text in it and insert the image down at the bottom of each page.

When you want to change the info in it, redo the image (keep a master that is updatable) and upload to your website. All pages will then be updated in one fell swoop.
Susan B (19)
63902 2002-07-20 23:47:00 Hi. What you can do is incorporate CSS (cascading style sheets) into your site. Lots of tutorials on the Net, but you could start here (www.htmlgoodies.com) Greg S (201)
63903 2002-07-20 23:54:00 SSI or Server Side Includes is the way to achieve this, but you will need to check if your webhost provides SSI. In coding, it is as simple as a filename include directive within a html file. Any files with SSI statements are by convention, named with a 'shtml' extension, so the server knows to pre-process the file, to produce html, at the time it is requested. wuppo (41)
63904 2002-07-20 23:55:00 I think you need to look at XML E.ric (351)
63905 2002-07-21 00:19:00 back again copy & pastse these;
you change things in " theNotes . xml " only once and it gets repeated .

-------- theNotes . xml ------------------
<?xml version="1 . 0"?>
<note>
<com>Some1</com>

<DateDue>February the 5th</DateDue>

<amount>$12 . 3</amount>

<body>Is the place to go . </body>
</note>
----------- the end ----------------

-------- page1 . html ---------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4 . 01 Transitional//EN">
<html>
<head>
<title>calender</title>
<meta content="text/html; charset=windows-1252" http-equiv=
"Content-Type">
<script language="JavaScript" type="text/javascript" for="window"
event="onload">

var xmlDoc=new ActiveXObject("Microsoft . XMLDOM")
xmlDoc . async="false"
xmlDoc . load("the_note . xml")

nodes=xmlDoc . documentElement . childNodes
com . innerText= nodes . item(0) . text
DateDue . innerText= nodes . item(1) . text
amount . innerText=nodes . item(2) . text
body . innerText= nodes . item(3) . text
</script>
</head>
<body bgcolor="#FFFF80" text="#d00000">
<h1>this is one page</h1>

<h3>Something for every page . </h3>

Company : <span id="com"></span>

Date Due : <span id="DateDue"></span>

Amount : <span id="amount"></span>

Notes : <span id="body"></span>
</body></html>
---------- the end of page one -------------

---------- page2 . html ---------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4 . 01 Transitional//EN">
<html>
<head>
<title>calender</title>
<meta content="text/html; charset=windows-1252" http-equiv=
"Content-Type">
<script language="JavaScript" type="text/javascript" for="window"
event="onload">

var xmlDoc=new ActiveXObject("Microsoft . XMLDOM")
xmlDoc . async="false"
xmlDoc . load("the_note . xml")

nodes=xmlDoc . documentElement . childNodes
com . innerText= nodes . item(0) . text
DateDue . innerText= nodes . item(1) . text
amount . innerText=nodes . item(2) . text
body . innerText= nodes . item(3) . text
</script>
</head>
<body bgcolor="#80FF80" text="#d00000">

<h1> this is another page</h1>


<h3>Something for every page . </h3>

Company : <span id="com"></span>

Date Due : <span id="DateDue"></span>

Amount : <span id="amount"></span>

Notes : <span id="body"></span>
</body></html>
---------------- the end of page two --------------------
E.ric (351)
63906 2002-07-21 02:42:00 Obviously there are some complicated ways oof doing this. :-(

There are always a number of ways to do anything. How about putting this stuff in a file called, say, "footer.html". Then wherever you want to include it, use (file://footer.html) I think that even I could manage that. ;-)
Graham L (2)
63907 2002-07-21 03:59:00 And to make it better, that's guaranteed not to work. At least it's a simple way that doesn't work. The others can't say that. :D

It might be interesting to try /footer.html The browser has got a method of handling files of that sort: itself.
Graham L (2)
63908 2002-07-21 05:48:00 > And to make it better, that's guaranteed not
> to work. At least it's a simple way that doesn't
> work. The others can't say that. :D

ROFL Good one Graham! :D :D
Susan B (19)
1 2