|
|
|
|
![]() ![]() |
Sep 21 2004, 01:16 AM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 22 Joined: 18-September 04 Member No.: 680 |
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. |
|
|
|
Sep 23 2004, 12:50 AM
Post
#2
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 17 Joined: 21-September 04 Member No.: 786 |
I suggest you try putting the closing quotations at the end of the file path.
|
|
|
|
Sep 23 2004, 05:17 AM
Post
#3
|
|
|
Member [ Level 1 ] Group: [HOSTED] Posts: 31 Joined: 9-September 04 Member No.: 402 |
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. |
|
|
|
Sep 24 2004, 06:29 AM
Post
#4
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 4 Joined: 24-September 04 Member No.: 832 |
By the way...i use SSI too... do you think its a good option???
|
|
|
|
Apr 22 2005, 09:12 PM
Post
#5
|
|
|
Member [ Level 1 ] Group: Members Posts: 32 Joined: 22-December 04 Member No.: 1,849 |
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! |
|
|
|
Nov 30 2007, 06:12 PM
Post
#6
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 30-November 07 From: Norway Member No.: 26,566 |
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! Edit: Oops! Topic is 3 years old.. I C! This post has been edited by Bluelight: Nov 30 2007, 06:20 PM |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 6th July 2008 - 10:13 PM |