Html/Java Question

C

Chris C.

This is what I have, a .txt document (53 lines).

What I need is some type of script that will randomly select a line from
that document and show it in plain text on the page. Any ideas that I could
be directed too?

Thanks!
 
D

David Dorward

Chris said:
This is what I have, a .txt document (53 lines).
What I need is some type of script that will randomly select a line from
that document and show it in plain text on the page. Any ideas that I
could be directed too?

http://www.aasted.org/quote/index.php should do the job[1], although you
need to turn the text file in to a fortune file.

[1] You'll need a server that supports PHP, it shouldn't be hard to
find/write something similar in JSP (or another language) if that's what
you prefer.
 
H

Hywel Jenkins

Chris C. said:
This is what I have, a .txt document (53 lines).

What I need is some type of script that will randomly select a line from
that document and show it in plain text on the page. Any ideas that I could
be directed too?

PHP, ASP, CGI, ... Or load the entire file in to a JavaScript array
and do it with JavaScript.
 

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,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top