Random Scripts
Created | Updated Jan 28, 2002
Hmmm... not much use for these now, is there???
This is two scripts using the 'random'-function. The first (1a and 1b) will show a different text on the page each time it's (re)loaded, the second (2) will load a random page when you click the link.
Texts or links are written inside quotation marks and seperated with commas as shown in the examples.
The number after the multiplication sign (in the examples '3') is the number of texts or links.
Surely someone could make some nicer scripts. I can't.
If anybody wants to use the scripts, they are welcome to do so!
1a. Random Text
of 3
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- RandomText by Ottox
var text = new Array ("Text no. 1","Text no. 2","Text no. 3")
var randNumb = Math.floor((Math.random()*3))
document.write(text[randNumb])
//-->
</SCRIPT>
of 3
1b. Random Text with a link
This is
Random text
This is
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- RandomText by Ottox
var text = new Array ("Text no. 1","Text no. 2","Text no. 3")
var randNumb = Math.floor((Math.random()*3))
document.write(text[randNumb])
function rload() {
self.location = self.location
}
//-->
</SCRIPT>
<BR />
<A HREF="javascript:rload()" ONMOUSEOUT="window.status=''" ONMOUSEOVER="window.status='Random text';return true">
Random text</A>
2. Random Link
This link will take you either to my page, to the GuideML-Clinic or to the Quick Reference Guide
Random link
This link will take you either to my page, to the GuideML-Clinic or to the Quick Reference Guide
<BR />
<SCRIPT LANGUAGE="JAVASCRIPT">
<!-- RandomLinks by Ottox
var newURL = new Array ("U150740","GuideML-Clinic","A344756")
var randNumb = Math.floor((Math.random()*3))
function randLink(link) {
location = (link)
}
//-->
</SCRIPT>
<A HREF="javascript:randLink(newURL[randNumb])" ONMOUSEOUT="window.status=''" ONMOUSEOVER="window.status='Random link';return true">Random link</A>
Places to go from here
Pick a LinkPulldown Link List (the code for this list)The GuideML ClinicGuideML GadgetsBruce (GuideML Guru)The Gurus' Home PageOttox