Solved

Embedded File

Posted on 1998-10-01
5
167 Views
Last Modified: 2010-04-09
Question: While creating a web site, I have a signatur file below and a menu bar to the left side. I recall there is a way to make a file contain a menu bar, and i just call it in each of my html files and it will embedded in there. For example I have 4 HTML pages, each got a signature file and a menu bar. If i were to change my signature file, then I must make the changs to all 4 of the HTML pages. Is there a way I can place a signature file in a HTML page, then type a certain code in each of the 4 HMLT pages, so if I change the signature file, the 4 HTML will automatically update itself.
and NO, i am not refering to use FRAME. All of this are done in HTML Tables. Thanks. If still unclear, email me at smilepak@earthlink.net. Thanks again.
0
Comment
Question by:smilepak
  • 2
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 240 total points
ID: 1838321
Yes you can do this with SSI or server side includes.  Depending on your service provider you may have these.  I don't think that earthlink provides that if that's your isp (based on your e-mail).  But they do a real nice job.  Here's an example if an SSI that I use to include a piece of an html file into many different pages which have that same comment part (which does quite frequently get updated):
<!--#include virtual="bottom_links.shtml"-->

ALso I think that there MAY be some html editors which have ftp capabilities built in which will allow this, but what they would do is rmember which files keep the shared part, mark that shared part in the file (probably with comments) and then when you make a change to the shared part, modify all the files on the site to register that change for all the files.  If ANY editors do this it would probably be Front Page, but I don't have it so I wouldn't know.  The best way will always be the SSI route.

Best of luck!
-Josh
0
 
LVL 28

Expert Comment

by:sybe
ID: 1838322
SSI commands for including any file into HTML:

<!--#include virtual="/virtual_path_from_root/filename.ext"-->
<!--#include file="relative_path/filename.ext"-->

The extension can be anything, including for example .txt and .gif (the latter is of course quite useless for an HTML file

Files that use SSI commands need a special extension, depending on the server. Very common are .shtml, shtm and .stm. But some servers need other extensions. It those extensions are not used SSI will not work.

Frontpage knows it own includes, but those only work when the web on which the site is running is a Frontpage web (so the webserver must be IIS3 or IIS4 and then be defined as a Frontpage web). You won't find many Frontpage webs on the net, as Frontpage interferes (not to say "messes around") with unpredictably the security.


0
 
LVL 8

Expert Comment

by:jbirk
ID: 1838323
Thanks for the clarifications Sybe.  I sometimes take those facts for granted and forget to mention them.

Also thanks for adding that extra info on FP98.  I've heard a lot about it, but never used it, so it's hard for me to say what it does :)

-Josh
0
 
LVL 28

Expert Comment

by:sybe
ID: 1838324
np, Josh :)

Additionally it is possible to use javascript "includes" (if your server does not support SSI.

<script src="bottomline.js">
</script>

and bottomline.js would then be some javascript code that display the desired text:

document.write('page maintained by The Author');

This will of course only work with javascript enabled browsers.
0
 
LVL 2

Author Comment

by:smilepak
ID: 1838325
thanks...

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
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…

776 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