Re: Random page updates.

Walter Ian Kaye (walter@natural-innovations.com)
Wed, 26 Feb 1997 18:55:40 -0800 (PST)


Date: Wed, 26 Feb 1997 18:55:40 -0800 (PST)
From: Walter Ian Kaye <walter@natural-innovations.com>
To: www-html@w3.org
Subject: Re: Random page updates.
In-Reply-To: <1.5.4.16.19970226211106.25e7e0a0@mail.csra.net>
Message-ID: <Pine.SGI.3.95.970226184307.23491B-100000@shellx.best.com>

On Wed, 26 Feb 1997, OpeDog wrote:
> I am making a page for the school I attend and currently the page is very
> under construction.  In fact, I started it anew, yesterday.  Anyway, this
> page contains frames and in the top part of the page is a little
> introduction.  I want this introduction then, to update itself to another
> random "micropage" in another directory.  This probably doesn't make sense
> but I think you get the picture.  So... is there any script or tag I can use
> to take and replace a current HTML document in a frame with another random
> HTML document in a seperate directory?

Well, you can't specify "random" in HTML, so you need a CGI that will pick
a file at random (1: get list of *.html files, 2:count # items, 3: generate
random integer between 1 and that #, 4:get that item from the list) and
return it with a Location: header, preceded by a Window-Name: header having
the name of your frame.

I have not tried this -- it's just off the top of my head. But you get the
idea.

Free spellcheck: that's "separate" (think "paragraph" for a mnemonic, maybe,
or imagine a redneck pronouncing "it's a pirate!";)

-Walter
 PS. Be sure to build a *full* URL for the file.

__________________________________________________________________________
    Walter Ian Kaye <boo@best.com>     Programmer - Excel, AppleScript,
          Mountain View, CA                         ProTERM, FoxPro, HTML
 http://www.natural-innovations.com/     Musician - Guitarist, Songwriter