NameSilo

INCLUDES w/o PHP?

NamecheapNamecheap
Watch

NetButch

Established Member
Impact
0
I am wondering if I can do a similar function to the PHP Include() function by using only HTML/DHTML/XML...

I want to make changing text really easy by using .txt files for the text and formating everything with CSS... the server does not support PHP or ASP and it will not ever.. so I need to find a way to do this without anything except the basic languages.. even JavaScript would be okay..

thanks in adavnce.

Butch
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
You can try something like this for use with Internet Explorer:

<object type="text/x-scriptlet" width="100" height="100" data="file.txt"></object>

Or if your server supports Server Side Includes you could do it that way. You can check if it supports SSI by adding something like:
<!--#echo var="DATE_LOCAL" -->
to a .shtml page and see if it displays the time. Then if SSI is enabled you can include files with the include directive:
<!--#include file="file.txt" -->
 
0
•••
yup, and can you set your .htaccess file so you don't even need to rename from .HTML - you can set it so that the webserver parses HTML like it would SHTML.

Google is your friend :D
 
0
•••
0
•••
0
•••
Very nice info guys! Thanks!
 
0
•••
Appraise.net

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back