Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > loading web content from a text file

Reply
Thread Tools

loading web content from a text file

 
 
miphize
Guest
Posts: n/a
 
      10-04-2005
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


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      10-04-2005
miphize wrote:

> 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.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
 
Hywel Jenkins
Guest
Posts: n/a
 
      10-04-2005
In article <13C0f.71957$> ,
says...
> 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?

--

Hywel
http://kibo.org.uk/
 
Reply With Quote
 
Stuart
Guest
Posts: n/a
 
      10-04-2005
miphize wrote:
> 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.

--
Stuart Brown <>
http://www.edesign.cc
 
Reply With Quote
 
miphize
Guest
Posts: n/a
 
      10-05-2005

"David Dorward" <> wrote in message
news:dhur54$o41$1$...
> miphize wrote:
>
>> 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.
>
> --
> David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
> Home is where the ~/.bashrc is


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


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      10-06-2005
miphize wrote:

> 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.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Loading flash content into a web page Tor Inge Rislaa ASP .Net 4 04-19-2007 08:44 AM
how to disable WMP from loading a preview of a file in Explorer.. without disabling Web Content? Michael Branchfield Computer Support 2 07-17-2006 01:56 AM
Dynamic loading of Web User Controls into a Content/ContentPlaceHo =?Utf-8?B?V291dGVy?= ASP .Net 1 02-25-2006 07:37 PM
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">? TheKeith HTML 20 10-29-2003 11:56 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57