Solved

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

Posted on 2000-05-09
3
173 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now