Display txt file

P

Peter Gray

Hi

Does anyone know how to display the contents of a txt file using Html or
java or anyother suggestion for a web page. with out having to use server
based scripts

many thanks

Peter
 
B

brucie

Does anyone know how to display the contents of a txt file using Html or
java or anyother suggestion for a web page. with out having to use server
based scripts

just link to the file. chances are that the visitor will have a program
associated for text files. but i get the impression that you want to
include the text file within a html page. server side is really the only
way to do it with any reliability. its very easy.

http://allmyfaqs.com/faq.pl?Include_one_file_in_another
 
C

Chris Morris

Peter Gray said:
Does anyone know how to display the contents of a txt file using Html or
java or anyother suggestion for a web page. with out having to use server
based scripts

Use a HTML pre-processor and/or templating system.
 
R

rf

Peter Gray said:
Hi

Does anyone know how to display the contents of a txt file using Html or
java or anyother suggestion for a web page. with out having to use server
based scripts

<a href="file.txt">display a text file</a> ?

Cheers
Richard.
 
S

Sid Ismail

: Does anyone know how to display the contents of a txt file using Html or
: java or anyother suggestion for a web page. with out having to use server
: based scripts


<a href="nursery1.txt">the text of Jack and the Beanstalk</a>

Try it.

Sid
 
P

Peter Gray

Thanks for the html source but i wanted to display it without having to have
a link to it.

peter
 
S

SeeSchloss

Does anyone know how to display the contents of a txt file using
Html or java or anyother suggestion for a web page. with out
having to use server based scripts

Maybe with an iFrame ?
Of course, a server based script would be really better,
like
<?php include "text.txt"; ?>
in PHP...
 
V

Voetleuce en f?nsievry

: Does anyone know how to display the contents of a txt file using Html or
: java or anyother suggestion for a web page. with out having to use server
: based scripts
<a href="nursery1.txt">the text of Jack and the Beanstalk</a>
Try it.

Ey Sid, how can I tell the browser to do word wrap on that text file?
None of my browsers do the word wrap thingy, and vertical scrolling is
so yesterday.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top