473,387 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to source parts of an html document from external files?

2
Hi all. I'm a fairly basic HTML worker, don't know any other language. This is my site: www.andrewgubb.com. A simple text-and-images site, like a blog I suppose except that I'm having more fun doing it just HTML.

This is a detail I've found when building my site. There are elements of all the pages which are common to each, but which I have to change every so often. Opening every single file and copying and pasting the changes is a massive effort, and as the website grows I'm finding I have to more and more. I'd like to find some way of getting round this. What I'd like is to have the variable pieces of the code in seperate files, and be able to refer to those files on each page, so when I change the "variable" files, the change is reflected on all pages.

I've tried frames and iframes and they both have horrible drawbacks. The aestetic quality of the page is ruined, and there is a lot of messing about with different bits of the code to do this or that, which always ends up doing something undesired. In short, way too clunky.

I'm sure there must be a simpler, neater way of doing this. What about, for instance, a javascript which just said, "insert this file into the code"? I tried that with what little I could muster of javascript but I couldn't pull it off... I think it might be possible though. Or any of the other languages.

There's gotta be a simple solution for this!
Aug 23 '08 #1
3 1285
acoder
16,027 Expert Mod 8TB
This recent thread should give you some ideas.
Aug 23 '08 #2
Gubby
2
Hm, thanks.

Trying a different tack, what if you made a program to manage your files for you? You open all the files in the program and tell it to replace everything between markers *A* and *B* with your updated variable content.
Aug 23 '08 #3
acoder
16,027 Expert Mod 8TB
If I understand you correctly, that wouldn't be a good idea.

If it's something simple, use server-side includes. If you want more control, use a server-side language. You could use JavaScript, but it's probably not a good idea depending on JavaScript to add important parts of the page.
Aug 23 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: jonathan.beckett | last post by:
Hi All, For the past few months I have been working on an open source Apache/PHP/MySQL content management system - and have recently made it available for download. It's still very much a...
1
by: M.E.Farmer | last post by:
Hello c.l.py!, I have just finished this and decided to share. PySourceColor is a module to convert Python source into colored html. Yes it has been done before, but I like this better:) You can...
0
by: Unigroup of New York | last post by:
Content-Type: multipart/mixed; boundary="------------C465DF38DCB38DD2AF7117E0" Lines: 327 Date: Tue, 15 Feb 2005 23:36:38 -0500 NNTP-Posting-Host: 24.46.113.251 X-Complaints-To: abuse@cv.net...
8
by: Jon Paul Jones | last post by:
For some time now, I have been looking for a build system for ASP.NET that will merge the file based ease of deployment of classic ASP with the type saftey and prebuilt nature of ASP.NET with...
9
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be...
13
by: Becker | last post by:
1.=========================================== /* a.c */ int x; int y; void main() { f(); printf("%x %x\n", x, y); }
0
by: sonu | last post by:
I have following client side code which i have used in my asp.net project SummaryFeatured Resources from the IBM Business Values Solution Center WHITEPAPER : CRM Done Right Improve the...
135
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about...
13
by: treble54 | last post by:
I need to build PHP from source with the pdo_ibm extension and I am having an issue with it. Firstly, I am using Visual Studio .NET 2003 and I am building PHP from source through the Visual Studio...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.