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

free web hosting
Free Web Hosting > Computers & Tech > Programming > Scripting > Server Side Includes (SSI)

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

KyoNiwa
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 work


I 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. biggrin.gif Thanks to whom ever has enough time to answer this

Reply

roninmedia
I suggest you try putting the closing quotations at the end of the file path.

Reply

OrbitPoints
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.

Reply

Reiji Kurosaky
By the way...i use SSI too... do you think its a good option???

Reply

everydaysushi
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!

 

 

 


Reply

Bluelight
QUOTE(everydaysushi @ Apr 22 2005, 10:12 PM) *
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:
CODE
<!--#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! biggrin.gif Please do not copy codes from my pages without notifying me first..

Edit: Oops! Topic is 3 years old.. I C!

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. html enable ssi inc iis 5 - 30.11 hr back. (1)
  2. phpbb ssi - 136.04 hr back. (1)
  3. phpbb3 ssi - 185.62 hr back. (1)
  4. ssi forum - 176.55 hr back. (3)
Similar Topics

Keywords : ssi forum


    Looking for ssi, forum

Searching Video's for ssi, forum
advertisement




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



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE