Solved

Gotta be a way to "include" html from a seperate file!?

Posted on 2000-05-09
3
179 Views
Last Modified: 2013-11-18
Hello,

I want to have a navigation bar on the side of my pages, but don't want to have to maintain the navigation bar in every single page....

Seems there has to be a way that a html document can "include" another files html... similar to how images are called/inserted into documents...

I asked a similar question earlier and people told me to use cgi/asp/javascript ... I don't want to go this route.... also, SSI is not an option....

Thanks,
Keith
0
Comment
Question by:keithedward
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:semkin
ID: 2793492
Hi Keith!
In this case..
Isn't it easier to make the navigation bar as a separate frame? :)

regards, semkin
0
 
LVL 2

Expert Comment

by:harnal
ID: 2793528
Hmmm...Scripts or frames, that is the question.  Why do you not want to use scripting?  
0
 
LVL 2

Accepted Solution

by:
Ber earned 50 total points
ID: 2794612
A simple answer is to use frames as stated above Just in case you don't know how to use frames here is some sample code to get you started:

<HTML>

<HEAD>
<TITLE>Your title here</TITLE>
</HEAD>

<FRAMESET cols="20%,*">
<FRAME SRC="sidebar.html" >
<FRAME src="main.html" Name="main" scrolling=auto>
</FRAMESET>

<NOFRAMES>
Your no frames HTML here
</NOFRAMES>

</HTML>

Sidebar.html will be your navigation bar and main will be where your webpages are displayed.you must reference the "main" frame using target

eg.: <A HREF = "Page1.htm"  TARGET="main">Page1</a>

This will specify a link to a page called page1 and the link will show up on the side bar provided you put the code in the side bar page "sidebar.html"

The other thing to watch out for is case sensitivity. This is the root of a lot of problems especially where links are involved and I suggest that you keep everything in lower case.

HTH
Ber...  
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question