loading web content from a text file

M

miphize

Have created a webpage as a template with a stylesheet, however am trying to
get the page to load content from content.txt file with little success.

The reason i am trying to do this is so that i can update the content
without bothering with the html or javasript code.

Currently have been wrestling with this for ages and read loads of books on
html/dhtml and javascript, i must be missing something but just not able to
find a solution.

Any help on this would be greatly appreciated.

Many thx
 
D

David Dorward

miphize said:
Have created a webpage as a template with a stylesheet, however am trying
to get the page to load content from content.txt file with little success.
The reason i am trying to do this is so that i can update the content
without bothering with the html or javasript code.

The key is to use software that will take your text and output HTML.
Something like Markdown (which is written in Perl and has been ported to
other languages including PHP).

This software could run on your workstation before you upload the pages
(preprocessing) or on the server each time that page is requested[1]
(server side programming).
Currently have been wrestling with this for ages and read loads of books
on html/dhtml and javascript, i must be missing something but just not
able to find a solution.

HTML is a language for describing the structure and semantics of a document
along with its relationship to other resources.

DHTML is a buzzword that generally means HTML + CSS + JavaScript + DOM.

JavaScript is a programming language commonly embedded in HTML documents to
produce visual effects or provide convenience functions for the user (such
as warning them that data they are entering in a form doesn't meet certain
requirements).

None of them are a good solution for the problem you have described.

[1] Although there might be a server side cache to avoid rerunning the
script when it isn't needed.
 
H

Hywel Jenkins

Have created a webpage as a template with a stylesheet, however am trying to
get the page to load content from content.txt file with little success.

The reason i am trying to do this is so that i can update the content
without bothering with the html or javasript code.

Currently have been wrestling with this for ages and read loads of books on
html/dhtml and javascript, i must be missing something but just not able to
find a solution.

Any help on this would be greatly appreciated.

Do a google for SSI or Server Side Includes. How do you intend to
format the content of the text file?
 
S

Stuart

miphize said:
Have created a webpage as a template with a stylesheet, however am trying to
get the page to load content from content.txt file with little success.

The reason i am trying to do this is so that i can update the content
without bothering with the html or javasript code.

Currently have been wrestling with this for ages and read loads of books on
html/dhtml and javascript, i must be missing something but just not able to
find a solution.

Any help on this would be greatly appreciated.

Many thx

It's easiest if you can use a scripting language such as PHP or ASP -
then you can just include the files.
 
M

miphize

David Dorward said:
miphize said:
Have created a webpage as a template with a stylesheet, however am trying
to get the page to load content from content.txt file with little
success.
The reason i am trying to do this is so that i can update the content
without bothering with the html or javasript code.

The key is to use software that will take your text and output HTML.
Something like Markdown (which is written in Perl and has been ported to
other languages including PHP).

This software could run on your workstation before you upload the pages
(preprocessing) or on the server each time that page is requested[1]
(server side programming).
Currently have been wrestling with this for ages and read loads of books
on html/dhtml and javascript, i must be missing something but just not
able to find a solution.

HTML is a language for describing the structure and semantics of a
document
along with its relationship to other resources.

DHTML is a buzzword that generally means HTML + CSS + JavaScript + DOM.

JavaScript is a programming language commonly embedded in HTML documents
to
produce visual effects or provide convenience functions for the user (such
as warning them that data they are entering in a form doesn't meet certain
requirements).

None of them are a good solution for the problem you have described.

[1] Although there might be a server side cache to avoid rerunning the
script when it isn't needed.

Thank you very much, I thought I were looking in the wrong places and you
have explained better than any of my supposedly web developer friends.

Me thinks its a simple idea adding/changing/updating web content from a text
file using CSS to do the formatting. Create a standard display of readable
content, the lazy way of updating websites without the boring html and code
<tags>.

I know there is no simple solution, Markdown seems to be a step in the right
direction although I'm not sure about Perl.

Thx
M
 
D

David Dorward

miphize said:
Me thinks its a simple idea adding/changing/updating web content from a
text file using CSS to do the formatting.

The trouble is that CSS is applied to markup, and a plain text file doesn't
have any, therefore you either need to write some, or have software guess
at the markup that should be there.
I know there is no simple solution, Markdown seems to be a step in the
right direction although I'm not sure about Perl.

Perl is a mature, widespead, and nowhere near as scary as many people make
out programming language. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top