OCCRA
Go to Post I don't know, there's quite a few teams that apply to travel to some random HS gym in Indiana every summer. - GaryVoshol [more]
Home
Go Back   Chief Delphi > Other > Chit-Chat
CD-Events   CD-Media   CD-Spy   FRC-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-16-2004, 12:03 PM
coreyk's Avatar
coreyk coreyk is offline
Alumni - Former President,Treasurer
FRC #0103 (Cybersonics)
Team Role: Leadership
 
Join Date: Nov 2003
Rookie Year: 2003
Location: PA
Posts: 70
coreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of light
Random Page Loader

Does anyone know of a script or HTML code that will cause a random page to be displayed from a list each time the page is accessed?

Thanks.
__________________
Corey
Cybersonics Technology Team 103 Alumni
www.cybersonics.org| cybersonics@palisadessd.org
Former President, Treasurer, Webmaster, Awards, and Editor
Reply With Quote
  #2   Spotlight this post!  
Unread 08-16-2004, 02:32 PM
JohnBoucher's Avatar
JohnBoucher JohnBoucher is offline
Registered User
FRC #0237
 
Join Date: Jan 2004
Rookie Year: 2003
Location: Watertown, CT
Posts: 2,680
JohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond reputeJohnBoucher has a reputation beyond repute
Re: Random Page Loader

Do you just want an different image to be displayed every time that page is loaded, or do you want a different .HTML page loaded?

The different image is easy, I don't know if you can do a different page.

Check out www.team237.com for the random image loader.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-16-2004, 03:37 PM
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: Random Page Loader

If you can use perl/cgi, php, jsp, etc, it should be very easy. Either hardcode an array with each element being the name of a file to be randomly selected, or dynamically create the array by making a list of all the files in a Database or directory. Then just use a random number generating function to select an element from the array and insert the contents of the file into the page. I can show you how to do it in PHP and others here know perl/cgi.
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award
Reply With Quote
  #4   Spotlight this post!  
Unread 08-16-2004, 03:38 PM
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 : 08-16-2004 at 03:41 PM. Reason: code debugged
Reply With Quote
  #5   Spotlight this post!  
Unread 08-16-2004, 05:58 PM
coreyk's Avatar
coreyk coreyk is offline
Alumni - Former President,Treasurer
FRC #0103 (Cybersonics)
Team Role: Leadership
 
Join Date: Nov 2003
Rookie Year: 2003
Location: PA
Posts: 70
coreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of lightcoreyk is a glorious beacon of light
Re: Random Page Loader

Thank you Eric, the script works! Thank you also to everyone who posted-- your help is greatly appreciated.
__________________
Corey
Cybersonics Technology Team 103 Alumni
www.cybersonics.org| cybersonics@palisadessd.org
Former President, Treasurer, Webmaster, Awards, and Editor
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print a different page than current page? KathieK Website Design/Showcase 9 08-24-2004 08:11 PM
Bug in IFI Loader rwaliany Programming 2 01-06-2004 08:26 PM
How random is random???? archiver 1999 0 06-23-2002 08:59 PM
page navigation Brandon Martus Announcements 2 12-06-2001 08:12 PM
How about a Drivers/Operators page and a Human Players page Anthony S. CD Forum Support 4 06-02-2001 09:47 PM


All times are GMT -5. The time now is 10:24 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi