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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include Files

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
0
0
US
Using ASP I can use include files so I do not require the same code for say my header and footer in every page. Can I do this in standard HTML?

Any suggestions?


Thanks!
 
Hi Michael, hi ayjaycee,

:) He ayjaycee, did you forgot your own post LOL

Look at this one Michael thread215-167492

Erik
 
I found this and variations of it in this forum:

<!-- #include file=&quot;header.txt&quot; -->

I also found a very enticing way to use JavaScript (.js) files. The catch here is that if someone does not have JavaScript enabled you are out of luck. Why would someone disable JavaScript? Is this done from the Browser settings on the client side?

Also, I thought I remembered a <TEXT> type HTML tag. I have code that I'd like to run in ASP and pure HTML environments. Looking for the best solution before coding a million lines.

<!-- #include file=&quot;header.txt&quot; --> is cool but it seems the calling file MUST be ASP (not .html).

Any more thoughts???

Thanks again for all your feedback guys\gals,

Michael
 
Hi Boomerang - I knew it was there somewhere, I was just too lazy to go searching for it! |-I


Michael, for SSI's to work, you normally have to rename the calling file to something.shtml although you may be able to re-configure your server to process *.html files too.

One by one, the penguins steal my sanity.
 
With ASP, I just call my include files .inc files.
It works perfectly. Calling pages .txt and .html is when you start to run into problems.
----------------------------------------
&quot;I got a fevah... and the only prescription is more cowbell!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top