Page 1 of 1

A start page just for me

PostPosted: Sat Dec 30, 2006 3:57 pm
by Bobtheduck
Ok, I built a start page just for myself, I attatched it so you can see (it's rediculously simple)... I am going to use it to remind myself of things whenever I get online... I edit the file whenever there's something important I need to remember... What I'd like to do, though, is somehow have random bible verses or important quotes or something show up whenever I loaded it... Remember, this stuff could be local and I'd actually prefer it to be local so I could edit the list whenever I wanted... I saw Mith do something like that with his signiature once, I was wondering if someone could tell me how to do that?

PostPosted: Sat Jan 20, 2007 1:48 pm
by teen4truth
*can't help* sorry :(

PostPosted: Sun Jan 21, 2007 3:43 pm
by Mithrandir
This javascript should do it. Just paste this whole thing where you want the text to show up. Add more elements to the array "text[n]" to make it work. Just be sure none of your quotes have quotation marks or you'll get an error. Also, increment in whole (integer) numbers.

- Mith
Code: Select all
<script language="Javascript">
var text=new Array()
text[0]="Thing 1.";
text[1]="Thing 2.";
text[2]="Thing 3.";
text[3]="Thing 4.";
var number_things = text.length;
var randomNum=Math.floor(Math.random()*number_things) -1;
if (randomNum < 0) { randomNum = 0; }
document.write(text[randomNum] + "Using: " + randomNum);
</script>