Jump to content
xisto Community
Sign in to follow this  
KyoNiwa

SSI I think this is in the right Forum...

Recommended Posts

Ok.... I have some SSI questions... I cant get my ssi to work. I want to SSI some Javascript peices into a page and some html(for my navigation bar) into a div (both of which are in different directories from eachother and from the index page).... but it wont workI have for my ssi: <--#include virtual="/subdirectory/javascript.html--> in my head and body *note: i have two different things in my head and body but they go together because it's javascript... subdirectory is substitute for the name of my subdirectory... javascript substitute for the names of my javascript.and <--#include virtual="/subdirectory/navigationbar.txt-->... and it doesnt work... I have these on 1asp host(if that's helpful to know) If anyone has answers to this... It is greatly appreciated. :) Thanks to whom ever has enough time to answer this

Share this post


Link to post
Share on other sites

Try this <!--#include file="/subdirectory/javascript.html"-->And make sure you name your file right ... some webservers use .ssi and some use .shtml. Most (maybe even all) webservers allow you to add or change extensions that are executed server side using the .htaccess file.

Share this post


Link to post
Share on other sites

I have this same exact problem, and apparently it's a tough one to solve. From what I've discussed with friends (because we looove discussing scripting in our free time), there're two elements to this. 1. Javascript is client-side, meaning it depends on the user's interaction with your website for anything to be activated. This is why rollover menus can be done through javascript, because there's a lot if-then action.2. SSI by definition is server-side, meaning it loads everything up previous to any user input. It's useful to use SSI when you're doing headers, footers, or other things that are consistent on many pages. It sounds like SSI is to script/coding much like the CSS of the style/designing of a page. EXCEPT that SSI is a little more complicated because it depends on what kind of hosting provider you have (Microsoft IIS 5.0? 6.0? Apache?) Yeah, I don't really know what that means in technical terms, but I know that SSI doesn't like to work unless it's in the right environment and all the rules are applied correctly.Another thing... make sure that when you have a regular .html file and you start thinking of using SSI in it (in other words, you decide to reference outside .html files--which are sometimes tagged .inc instead of .html, to avoid confusion), you change the initial file to .shtml. This is a sign to the computer to look for the referenced .html/.inc files before it finishes loading.Hope this helps your problem... it wasn't enough to help mine, but it's a start!

Share this post


Link to post
Share on other sites

I have this same exact problem, and apparently it's a tough one to solve. From what I've discussed with friends (because we looove discussing scripting in our free time), there're two elements to this.
1. Javascript is client-side, meaning it depends on the user's interaction with your website for anything to be activated. This is why rollover menus can be done through javascript, because there's a lot if-then action.

2. SSI by definition is server-side, meaning it loads everything up previous to any user input. It's useful to use SSI when you're doing headers, footers, or other things that are consistent on many pages. It sounds like SSI is to script/coding much like the CSS of the style/designing of a page. EXCEPT that SSI is a little more complicated because it depends on what kind of hosting provider you have (Microsoft IIS 5.0? 6.0? Apache?) Yeah, I don't really know what that means in technical terms, but I know that SSI doesn't like to work unless it's in the right environment and all the rules are applied correctly.

Another thing... make sure that when you have a regular .html file and you start thinking of using SSI in it (in other words, you decide to reference outside .html files--which are sometimes tagged .inc instead of .html, to avoid confusion), you change the initial file to .shtml. This is a sign to the computer to look for the referenced .html/.inc files before it finishes loading.

Hope this helps your problem... it wasn't enough to help mine, but it's a start!


I think the best way to make SSI pages, is with *.asp pages, and this requires the server to support ASP (Active Server Pages).. I have only include commands in my html (.asp) -files..

The file "p001.asp" contains:
<!--#include virtual="/hidden-inc/head.inc" --><!--#include virtual="/hidden-inc/table.inc" --><!--#include virtual="/hidden-inc/logo.inc" --><!--#include virtual="/hidden-inc/menu.inc" --><!--#include virtual="/hidden-inc/p001.inc" --><!--#include virtual="/hidden-inc/table-end.inc" -->
Works like a charm! :rolleyes: Please do not copy codes from my pages without notifying me first..

Edit: Oops! Topic is 3 years old.. I C!
Edited by Bluelight (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.