HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Help with SSI, keep getting error message
Post new topic   Reply to topic    HTML Help Forum Index -> SSI
View previous topic :: View next topic  
Author Message
julieanne



Joined: 10 Mar 2009
Posts: 6

PostPosted: Tue Mar 10, 2009 10:34 pm     Help with SSI, keep getting error message Reply with quote

Hi,
I am totally new to HTML and for a class I'm taking, we have to take simple webpages we've made on the school's server and use SSI's to make a left navigation on each of the pages we've made. I've tried so many different ways and every time I tri I get the message "[an error occurred while processing this directive]," i.e. a nice way of saying I don't know SSI Razz The rest of my page renders fine, however. Through coding I was able to make a left navigation but, on two of my pages that are more design/css 'heavy', so to speak, the page renders completely off using the code I wrote for the left navigation. Can anyone help me out? Sad
The assignment said, as follows:
2. To add a server side include (ssi) to this file, you will first have to change its extension to .shtml so that file is parsed by the server before it is sent to the browser.

Now, in order to include another file within your .shtml file, you will have to use an ssi like this:

<!--#include virtual="../../includes/navigation.html" -->

(Make sure the relative path is correct)

2. The structure of each of your existing webpages will need to be modified as follows:

<!-- existing code prior to the body element -->.
<body>
<div class="left">
<!-- call the ssi as described above to include the navigation.html file in this div section-->
</div>

<div class="content">
<!-- all of your existing content within the body element-->
</div>
</body>
</html>

3. Add a css file called common.css to the includes folder. Add to it the styles for left and content such that at the minimum:

the left div section has a width defined and floats from the left
the content div has at least a width and a left margin defined for it.
________
Trying with SSI, my page renders like this:
http://people.ischool.berkeley.edu/~web39/190-02/a2/a22.shtml
Trying with the code I wrote up, I get something like this:
http://people.ischool.berkeley.edu/~web39/190-02/a2/a2.shtml
(if you click on the links to Assignments three and four on the latter link, you can see what I mean by the CSS/design heavy pages not rendering properly at all.
Any tips?
I hope this wasn't too long winded and/or confusing!
sticks464



Joined: 31 Dec 2006
Posts: 2308

PostPosted: Wed Mar 11, 2009 2:58 am     Reply with quote

Make sure the file to include is in the includes folder and try it like this

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
   <meta http-equiv="Content-Type"
   content="text/html; charset=UTF-8">
   <title>Julieanne's Favorite courses</title>
    <link href="simple.css" rel="stylesheet" type="text/css">
</head><body><div class="left">[an error occurred while processing this directive]</div><div class="content"> <p>These are some of my <strong>favorite</strong> courses that I have taken at <em>Cal</em> thus far.</p>

   <dl><dt>My favorite courses</dt>
      <dd>
         <!--#include file="includes/navigation.html" -->
        </dd>
    </dl>
 <a href="http://delicious.com/julieanne88" title="My delicious">My delicious</a>
<a href="http://validator.w3.org/check?uri=http://people.ischool.berkeley.edu/~web39/190-02/a2/a2.html">Validate</a></div></body></html>
julieanne



Joined: 10 Mar 2009
Posts: 6

PostPosted: Wed Mar 11, 2009 8:29 am     Reply with quote

Thanks but I'm still getting the same error...?
Is something maybe off with my navigation page?
The link to it is:
http://people.ischool.berkeley.edu/~web39/190-02/includes/navigation.html
It's just a simple page with links. :\
sticks464



Joined: 31 Dec 2006
Posts: 2308

PostPosted: Wed Mar 11, 2009 8:38 am     Reply with quote

Most likely it is the path to the included file. Your working files all should be inside a master folder. The master folder will contain the includes folder and the shtml file. The navigation.html file should be inside the includes folder.
The include command does not need any / in the path
Code:
<!--#include file="includes/navigation.html" -->
julieanne



Joined: 10 Mar 2009
Posts: 6

PostPosted: Wed Mar 11, 2009 1:42 pm     Reply with quote

Thank you!!! Smile
I finally got the left nav bar in place however, on my two CSS heavy pages it is totally shifting the layout, especially on my form page. Do you have any idea why?
e.g.

http://people.ischool.berkeley.edu/~web39/190-02/a4/a4.shtml
and
http://people.ischool.berkeley.edu/~web39/190-02/a3/sample.shtml

(ignore the lack of link buttons..I'm working on putting them in as I type this!!)
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> SSI All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
DARFUR
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial