Click to See Complete Forum and Search --> : External HTML


Ivan SSY
05-25-2005, 09:58 AM
Hi, is there a way I can use external file (HTML) within <BODY>...</BODY>? Just like when we use external script with <SCRIPT SRC="external.js"> </SCRIPT>



I've tried <LINK...> but it only works within <HEAD>...</HEAD>

Thanks in advance.

TheBearMay
05-25-2005, 10:02 AM
You could use SSI (may have to make the file extension .shtml):


<!--#include file="IncludedFile.html" -->

Frozenyam
05-25-2005, 05:53 PM
Do you mean, like being able to run a program directly from the page instead of downloading it? If so, then that might be a lengthy process using only HTML

AdamGundry
05-26-2005, 05:10 AM
If you want to include code directly into the page, you will need support for this on your server, either SSI as TheBearMay suggested or another language such as PHP. This page (http://webdevfaqs.com/php.php#include) has more details for both.

Alternatively, you may be able to do what you want with iframes, but be careful of accessibility issues.

Adam

Stephen Philbin
05-26-2005, 05:44 AM
Try using SSI as The Bear May suggested first because that is by far the most quick and simple way to get it done.