Ok,
I am having a little bit of trouble. I am unable to get the include function to work. I am running IIS 5, should this still work. Any assistance in the matter is much appreciated.
Jeremy
Printable View
Ok,
I am having a little bit of trouble. I am unable to get the include function to work. I am running IIS 5, should this still work. Any assistance in the matter is much appreciated.
Jeremy
what error messages are you getting?
and how are you calling them?
I am not getting an error on the server or the client, the included pages simply does not display.
Any ideas?
Make sure that
1. The file that has the includes in has the extension .shtml
2. The files you are including have the extension .html
If the above two have been done then it is your server that is incorrectly configured!
View source on the page and look if the
include line:
<!--#include virtual="your file.html"-->
is there.
if it is then it is not being interpreted by the server.(Check your server config!!)
This should help!
Wow... I'm using .inc for included file extensions. It is working on every machine we've tried it on save one, and that one is running ASD.
ASD ??
I don't think it matters what the included file is called i just said .html as an example cos i know that works!
SSI shouldn't care what file extension you use for include files.
thought as much! :cool:
ASD = Active Server Directory
We get permissions errors when an ASP tries to include a file that is in the same directory. It is only on that machine, and that machine is the only one running ASD. I don't have a clue what the problem is.
Ok if I use the extesion of shtml it works, is there anyway I can have this work for htm or html files?
Jeremy
I've never heard of that technology (ASD) so i wouldn't have a clue m8
sorry!
:rolleyes:
you would have to change your servers config so that the extension(s) (.htm, .html) are associated with SSI,
This would slow down every .htm, .html file you have on that server as they would all be pre-processed by the server regardless of whether they contain includes or not.
So i wouldn't bother if i where you ;)
Really don't have much of a choice, do you know where I can change these options?
Jeremy
I too wouldn't do that. changing it so every htm or html extension is parsed as SSI will slow things down considerably, and/or might have troubles with that as well.
the file doing the include has to be .shtml and you can include anything like .inc or .txt or .html, that shouldn't matter.
but changing it will make the server work twice as hard.
why wouldn't you not have a choice?? it is easier to leave it as is and make the extension as .shtml. also if it is an ISP you might not be able to do that.
just my 2 cents
to change the extension .html to be associated with SSI
1. go into control panel/computer management
2. find and expand the internet information services tree
3. right click on the website you wish to change the extensions on
4. click the home directory tab
5. click the configuration button
6. you will then see a list of extensions and there associated executables & dll's
from here you can edit them !
Don't take this as gospel but server side include technology isn't a very secure technology.
If you wish to templatise your pages you can use javascript templates. for example if you have a header that you want included on every page you can put it in a js file and do the following
This is a method i use on a regular bases, it can also be quite fast as the first time the js file is used by a user it is cached on there machine so for the rest of the site the html will be loaded in faster.Code:#js file header.js
var header = "";
header+="<h1>my included javascript header</h1>";
#html page home.html
<html>
<head>
<script language="javascript" src="header.js"></script>
</head>
<body>
<script language="javascript">document.write(header)<script>
<h2>my content</h2>
</body>
<html>
This method should be quicker than SSI as it is a clientside technology which is usually quicker than server side, and it won't slow your server down, and you can keep your pages with the .html extension!
Well there u go now you have two choices!
I recommend you give the js way a try before changing you server extensions
thanks progressive, never thought about doing it that way, engenious man purely engenious. :D
no probs !
I was going to use the JavaScript header to display the header but the only problem is the page call a javascript function and has both types of quotes in it '," so that when I do a document.write the script is incomplete because the ' or the " terminates the string of the write function. I am really not to concerned with security as this site does not have a confidetial or secure information on it.
Jeremy
Code:<script type="text/javascript">
document.writeln("I'm a JavaScript that can write \"s. Aren't I special?");
</script>
Thats easy all you need to do is escape the ' by putting \ infront of it
see the attachment!
This is true, the only problem is this header is a adobe golive document that has serveral floating text boxes and uses style sheets. When all is said and done this document is a lot of lines and to write the document as a javascript and reformat all the strings everytime something is updated would be an extrodinary job within its self. I was going to use the shared boarder option in FrontPage but frontpage doesn't handel all the dhtml correctly and rewrite the top boarder and then all kinds of script error occurs.
Jeremy
Dreamwever uses library's to allow you to templatise your page.
you can have a page with content on and include a header and footer library etc..
All the html is in the one page, but dreamever knows that if you change something in the header or footer library it has to update the page.
This then leaves you with a complete html page which you can upload!
Thats a pretty flakey description but one worth looking into ;)
Oh well you seem to know what your doing so i'll let you decide what you want to do. :cool:
Humm, that sounds pretty neat but I am restricted to FrontPage and GoLive because that is what is covered under out campus agreement.
Jeremy