|
Java: Navigation menu
This script generates a spiral navigation wheel when placed in the <Head> tag (There is also another park below which has to be placed in the <Body> tag. There is much information to fill in, so this is best for those who know what they're doing.
<Script language="JavaScript">
<!-- Begin
function makeArray(q){
for(i=1 ; i < q ; i++){this[i]=0}}
w=1;
howmanysites=4; // How many sites are listed below?
Sites = new makeArray(howmanysites);
<!-- STEP TWO: Use the pattern: url~Site Title|Description for links
-->
Sites[1] = "http://www.fortunecity.co.uk/skyscraper/core/359/highband/htmljava.htm~The JavaScript Source|Great scripts!";
Sites[2] = "http://www.geocities.com~Geocities|Free webspace!";
Sites[3] = "http://www.yahoo.com~Yahoo!|Great Search Engine!";
Sites[4] = "http://surf.to/pcstuff~PC
Stuff|Everything PC is here!";
function showSites() {
if (w > howmanysites) { w=1; };
var string=Sites[w] + "";
var split1=string.indexOf("~");
var split2=string.indexOf("|");
var url=string.substring(0,split1);
var name=string.substring(split1 + 1,split2);
var word=string.substring(split2 + 1,string.length);
document.form.url.value=url;
document.form.name.value=name;
document.form.word.value=word;
w+=1;
window.setTimeout('showSites()',3000);
// You can change the speed! 3000 = 3 sec delay. 5000 = 5 sec delay, etc.
}
function visitSite() {
window.location=document.form.url.value;
}
// End -->
</Script>
The you must insert the next part of the Java script into the <Body> tag.
<Center>
<Form name=Form>
<Table><Tr><Td
align=Center>
<Input type=Button name=Name
value="Visit" onClick="VisitSite()"
Size=25>
<Input type=Hidden name=Url
value="">
<Input type=Text name=Word
value="" Size=40>
</Td></Tr></Table>
</Form>
</Center>
<Script>
showSites();
</Script>