Click to See Complete Forum and Search --> : #include directive does not work in HTML
Hina77
Sep 1st, 2003, 08:33 AM
Hi,
I need to call Html file from another HTML file. To accomplish this I use Include tag as:
<!-- include file ="file:///E|/vb/vbToweb/test2.html" -->
but this doesn't work in both browsers IE and netscape
Early response will be highly appreciated.
Thanks,
Hina
RealisticGraphics
Sep 1st, 2003, 09:46 AM
The #include directive only works server side. The best way to accomplish what you need is to use ASP or JSP. The only way I know of to include any other file for you HTML page is with JavaScript. For Example:
<script language="JavaScript" src="scripts/main.js"></script>
Then you can call functions that are in that JS file to build sections of your page.
DeadEyes
Sep 1st, 2003, 01:47 PM
You can use Frames or the iFrame, the iFrame might behave oddly with different browsers though.
The Hobo
Sep 1st, 2003, 01:48 PM
The server must suppor SSI (server-side includes), and the file must have a .shtml (I think) extension.
Hina77
Sep 2nd, 2003, 05:18 AM
Thanks all of you :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.