include html in html
-
Hi I have a menu (html) that always stays the same. I want to include this menu on my other html pages, but don't want to use frames. How is this done? I know there's a #include syntax in asp, but I want to use only html. tx
-
(i.e. if I have an includes folder at the root of my web dir) or (i.e. to 'step back' one dir and into the includes folder.) include virtual is the best way to include a file.
-
Hi sorry but this stil does not work, I don't know what I'm doing wrong! my one file is a.html: standard "hallo world" sentence the other one is b.html: in the same dir...
If using 'include virtual' it doesn't matter if the file is in the same directory or not - you always specify the absolute path from the web root. Meaning, if your domain name is acme.com, and you have a folder called 'includes', then the full URL to your includes would be www.acme.com/includes/...same with this. If your a.html is in a directory other than the web root, then you have to specify it (i.e., include virtual = "/includes/a.html" or whatever your path is). If it's in the same directory you can simply use 'include file' and it will work in your particular example as well. Robby
-
Hi sorry but this stil does not work, I don't know what I'm doing wrong! my one file is a.html: standard "hallo world" sentence the other one is b.html: in the same dir...
This is SSI (server-side include) syntax and must be supported by the web server. Either the web server must be configured to treat
.html
files as SSI files or the file must be renamed to the use the extension associated with SSI (usually.shtml
). Think of SSI as a "lightweight" scripting language that doesn't have the advanced features of languages like ASP/JSP/PHP. - Mike -
Hi I have a menu (html) that always stays the same. I want to include this menu on my other html pages, but don't want to use frames. How is this done? I know there's a #include syntax in asp, but I want to use only html. tx
Hi Brakanjan: You can have the menu as a .JS file with the statements like document.write (''); Assuming your .Js file is named as menu.js Now in other pages you can just include this in your other pages as: Did this solve your problem? Deepak Kumar Vasudevan Personal Web: http://www24.brinkster.com/lavanyadeepak/default.asp I Blog At: http://deepak.blogdrive.com/