[html5] ASP and Random Text Files
themoran2 at gmail.com
Tue May 8 13:02:17 PDT 2012
Why not put the data in a database?
That way you'll be able to get a random (or just about any)
poem with a single file.
Unfortunately I can't help you with asp (never used it),
but you could take a look at the following for some reference:
link to the file or embed it with a frame or what-not.
With some clever naming convention of your files (e.g. poem1.doc,
you could use something like (alert: pseudo-code):
// get a random number between 1 and 100
// (of course, this should map to your filenames in some way)
var article_id = Math.floor((Math.random()*100));
// and here you pull it in with ajax, or simply just create a link node in
var article = ....
2012/5/7 R David Paine III / WeirDave <weirdave at aol.com>
> I am a casual web developer with simplistic sites that I work on for
> barter. My personal website has been up for over two decades and still has
> pretty decent traffic, but I would like to increase that by including my
> poetry on the website but I don't feel like making a page for each poem as
> I have a couple of hundred. I was wondering if there was a way to randomly
> include from a folder of my works a poem a day or something like that. I
> have them in word doc format and text at the moment. I used ASP to make
> formatting easier and have been using it in its simple form for awhile and
> I am certain there are more advanced features I am certain I am missing.
> Any assistance would be appreciated.
> R David Paine III / WeirDave
> weirdave at aol.com
> Find me at about.me/weirdave and http://www.weirdave.com
> Help mailing list
> Help at lists.whatwg.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Help