Solved

Embedded File

Posted on 1998-10-01
5
150 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Tag input html 4 38
html input clean up 3 32
Modify Table Width 6 13
addressing a specific html page 9 25
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

706 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

19 Experts available now in Live!

Get 1:1 Help Now