Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2000-05-09
3
Medium Priority
?
181 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 100 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

718 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