Inserting external HTML

windows

Guest
I have a table whose contents need updating fairly frequently and which is displayed on many different webpages on my site. Is it possible to write this as an external file and insert the file into all the other pages? I have seen this done with Javascript, but can it be done with a piece of HTML code? I would rather not use frames if possible.<!--content-->nope you can not do this with html,however,if you used the XML file and made changes on that file whenever you wanted,and created the part of the table in question using XSL/XSLT,it would work cross browser(atleast in NS6+ and IE6+ for sure).<!--content-->*sigh* Thanks for your help. Back to Plan B, I guess.<!--content-->You could also use some server side language to include your files... PHP, SSI, etc...<br />
<br />
.php<br />
<?PHP<br />
include ('yourfile.ext');<br />
?><br />
<br />
.shtml<br />
<!--#include file="yourfile.ext"--><!--content-->Hm. Ok thanks. I'll give that a try.<!--content-->Keep in mind... using <?php ?> and .php will only work if PHP is installed on your server. The other one, to my knowledge, works without the need of anything on the server.<!--content-->Originally posted by Falconix <br />
The other one, to my knowledge, works without the need of anything on the server. Actually, the server needs to support Server Side Includes for the second method. Both of them require server side parsing...<!--content-->And on some SSI enablesd servers you will need to use <!--#include virtual="yourfile.ext" -->. <!--#include file="yourfile.ext" --> has been depricated for reasons of security.<!--content-->I know I have PHP and SSI installed on the server although I know virtually nothing about them. Yet. Thanks for the tips.<!--content-->I tried it using php and it worked fine, except that when I visit that webpage, my address bar disappears. Does anyone know what causes this and how I can prevent it?<br />
<br />
I couldn't get the shtml version to work. My error log said:<br />
<br />
unable to include "http://blahblah/file.html" in parsed file /home/blahblah/file.shtml<!--content-->
 
Back
Top