Re: Rotate HTML code-such a thing?

by "Matthew Ohlman" <programingfreak(at)yahoo.com>

 Date:  Sat, 4 Aug 2001 15:05:08 -0500
 To:  <hwg-basics(at)hwg.org>
 References:  computer
  todo: View Thread, Original
Here is some code that i got from www.webcoder.com
---------------------------------------
<HTML>
<HEAD>
<TITLE>Randomly Generated Idea</TITLE>
<SCRIPT LANGUAGE = "JavaScript">

// The Array Function

function makeArray(len) {
    for (var i = 0; i < len; i++) this[i] = null;
this.length = len;
}

// This is where the array of text/images/sounds is created.

ideas = new makeArray(4);
ideas[0] = "Type \"about:cache\" into your browser to find everything that
is stored in your cache.";
ideas[1] = "Type \"about:mozilla\" to get an odd message from the Netscape
team."
ideas[2] = "Hold down shift when pressing reload to clear a page\'s items
from cache."
ideas[3] = "Type \"view-source:\" preceding a document\'s URL to
automatically view its source."


// The random number generator.

function rand(n) {
seed = (0x015a4e35 * seed) % 0x7fffffff;
return (seed >> 16) % n;
}

var now = new Date()
var seed = now.getTime() % 0xffffffff

</SCRIPT>
</HEAD>
<BODY>

Today's Randomly Generated Idea is:
<P>

<SCRIPT LANGUAGE = "JavaScript">

// Where you place this is where the random object will be displayed.

document.write(ideas[rand(ideas.length)])
</SCRIPT>

</BODY>
</html>
----------------------------------------------

Hope this helps,
Matthew

-----Caranois Wrote: ----- 
From: "Caranois" <vjmartin(at)charter.net>
To: <hwg-basics(at)hwg.org>
Sent: Friday, August 03, 2001 12:16 PM
Subject: Re: Rotate HTML code-such a thing?


> On the topic of rotating html code ...
> 
> Does anyone know of a rotating script of sorts that
> will allow me to program quotes and have them rotate 
> every 24 hours...
> 
> I know absolutely NADA about scripts so please be kind. ;-)
> And give me something that I can figure out... ;-)
> 
> I do not need this for immediate use, but I have plans for it in 
> the near future...
> 
> Thanks for your help.
> 
> Vik
> Caranois
> http://www.caranois.com
> http://www.inspired-graphics.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> "Work like you don't need the money,
> love like you've never been hurt, and
> dance like you do when nobody's watching"
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA