View Single Post
  #2   Spotlight this post!  
Unread 16-08-2004, 16:38
rowe rowe is offline
Eric Rowe
FRC #1097 (Site 3 Engineering)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Sacramento, CA
Posts: 133
rowe has a spectacular aura aboutrowe has a spectacular aura about
Send a message via AIM to rowe Send a message via MSN to rowe Send a message via Yahoo to rowe
Re: Random Page Loader

im just making this on the fly, but i think the code would be:
Code:
<script type="text/javascript">
<!--
var pages = new Array('url1','url2',...,'urlN');
function loadRandomPage(){
  var newPage = pages[Math.floor(Math.random()*pages.length)]
  window.location=newPage;
}
//-->
</script>
<input type="button" onclick="loadRandomPage()" value="Change URL">
Let me know if that works.
__________________
Eric Rowe | Alumn
Team 1097 | Site 3 Engineering
2005 Silicon Valley Regional Finalists
2005 Silicon Valley Regional Sportsmanship Award
2005 Sacramento Regional Finalists
2005 Sacramento Regional Sportsmanship Award
2004 Silicon Valley Regional Sportsmanship Award
2004 Sacramento Regional Visualization Award
2004 Sacramento Regional Engineering Inspiration Award

Last edited by rowe : 16-08-2004 at 16:41. Reason: code debugged
Reply With Quote