atw: How to include another file in an HTML page?

  • From: hedley.finger@xxxxxxxx
  • To: austechwriter@xxxxxxxxxxxxx
  • Date: Thu, 8 Sep 2005 13:06:10 +1000

JavaScript gooroos (similar to kangaroos but a lot smarter):

How do you include the contents of another file in an HTML page?

I am stumped.  Neither Google nor all of the various JavaScript sites
yielded an answer to my problem, even after searching for "javascript
urls", "javascript files including", etc.

For example,

...
<body>
<p>Here's my text!</p>
<!-- Somehow include contents of contact_details.txt here -->
</body>
...

The contact_details.txt file contains just this:

<p>
MyName<br />
MyStreet<br />
MyTown<br />
MyStateAndPostcode<br />
MyTelephoneNumber<br />
</p>

So, when I change address, only the contact_details.txt file needs to be
updated, thus automatically updating all pages that somehow include it.

Question is, how DO you include the contents of an external file?

Regards,
Hedley

--
Hedley Finger
Technical Communications Tools & Processes Specialist
MYOB Australia <http://myob.com/au>
P.O. box 371   Blackburn VIC 3130   Australia
12 Wesley Court   Tally Ho Business Park   East Burwood VIC 3151
Australia
<mailto:hedleyDOTfingerATmyobDOTcom>
Tel. +61 3 9222 9992 x 7421,   Mob. (cell) +61 412 461 558

© MYOB Technology Pty Ltd 2005

**************************************************
To post a message to austechwriter, send the message to 
austechwriter@xxxxxxxxxxxxxx

To subscribe to austechwriter, send a message to 
austechwriter-request@xxxxxxxxxxxxx with "subscribe" in the Subject field.

To unsubscribe, send a message to austechwriter-request@xxxxxxxxxxxxx with 
"unsubscribe" in the Subject field.

To search the austechwriter archives, go to 
www.freelists.org/archives/austechwriter

To contact the list administrator, send a message to 
austechwriter-admins@xxxxxxxxxxxxx
**************************************************

Other related posts:

  • » atw: How to include another file in an HTML page?