Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

external source?

Status
Not open for further replies.

everytime

Programmer
Feb 21, 2001
31
GB
I have some html which I would like to include in several pages (it sets up a menu system, and I don't want to use a frameset). Is there a way to write that text to the html document? I tried changing the html to javascript (with document.write before each line) and then used document write to call that javascript from the html doc I want it in but this printed output directly to the browser. Any ideas?
 
If you have all these setup in a separate file with document.write() on each one, then -
<script language=&quot;JavaScript&quot; src=&quot;yourfile.js&quot;></script>

should do it.

You may want to consider SSI - Server Side Includes

SSI Format -

<!--#include virtual=&quot;yourfile.txt&quot; -->

Only prob with SSI is the page has to be called *.shtml instead of *.html Dean Owen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top