|
CodeAve.com - ASP - Random Functions | |||
|
|
|||
| ASP Eight Ball | ||||
|
|
||||
<html> <title>CodeAve.com(8ball)</title> <body bgcolor="#FFFFFF"> <center> <!-- Beginning of the Image Form Area --> <form action="<%= request.servervariables("script_name") %>" method="post"> <input type="hidden" name="u_input" value="Yes"> <input type="image" src="images/8ball.gif"> </form> <!-- End of the Image Form Area --> <br> <% dim saying(20) ' set the variable saying with 20 dimensions saying(1)="As I See It, Yes" saying(2)="Ask Again Later" saying(3)="Better Not Tell You Now" saying(4)="Cannot Predict Now" saying(5)="Concentrate and Ask Again" saying(6)="Don't Count On It" saying(7)="It Is Certain" saying(8)="It Is Decidedly So" saying(9)="Most Likely" saying(10)="My Reply Is No" saying(11)="My Sources Say No" saying(12)="Outlook Good" saying(13)="Outlook Not So Good" saying(14)="Reply Hazy, Try Again" saying(15)="Signs Point to Yes" saying(16)="Very Doubtful" saying(17)="Without a Doubt" saying(18)="Yes" saying(19)="Yes Definitely" saying(20)="You May Rely On It" ' pick a random number between 1 and 20 randomize random=int(rnd*20)+1 u_input=request.form("u_input") ' if the user asked a question of the 8 ball display it if u_input<> "" then response.write saying(random) else ' if this is the users first visit display this message instead response.write "Ask a Question to the 8 Ball<br>and click for your answer" end if %> </body> </html>
|
||||
|
|
||||