Hail,
I need help yet again, although I'm learning great stuff from here and I'm very gratefull. This is the situation:
I load this ASP page with numbers that appear at random (characteristics of a character)
Now I need two buttons, one that will accept the stats and go to menu.asp which I think I've managed to do.
Second one is a reroll button, which in fact should simply reload the screen to get new numbers. Can anyone help me on this? Should I use menu.asp to validate if user clicked the reroll button, what type should that button be?
This is what I have for my asp page, my menu.asp is not finish but if you need it to understand let me know
<%@ Language=VBScript %>
<html>
<form name=frmTT method=post action=menu.asp>
<head>
<title>Gladiators</title>
</head>
<body text="#000000" bgcolor="#C0C0C0" link="#0000EE" vlink="#FFFF99" alink="#FF0000">
<center><font size=+4>Creating your Gladiator's stats</font><font size=+4></font>
<p><font size=+2>Here you may reroll your stats as many times as you wish by pressing the reroll button</font>
<br><br><br>
<%
sql = "select * from races WHERE Race = '" & request.form("cmbRaces" & "'"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "Glad"
Set rs = Server.CreateObject("ADODB.Recordset"
rs.Open sql, Conn
%>
<%
Dim Hit, Par, Dod, Dam, Arm, Att, Lif, Sta, Spd, Wil, Cha, HitBns, ParBns, DodBns, DamBns, ArmBns, AttBns, LifBns, StaBns, SpdBns, WilBns, ChaBns
Randomize
HitBns = rs("Hit"
Hit = int((rnd * 20) + HitBns + 1)
response.write "Hit: " & Hit & " on possible " & hitbns +20
%>
<br>
<%
Randomize
ParBns = rs("Par"
Par = int((rnd * 20) + ParBns + 1)
response.write "Par: " & Par & " on possible " & ParBns +20
%>
<br>
<%
Randomize
DodBns = rs("Dod"
Dod = int((rnd * 20) + DodBns + 1)
response.write "Dod: " & Dod & " on possible " & Dodbns +20
%>
<br>
<%
Randomize
DamBns = rs("Dam"
Dam = int((rnd * 3) +DamBns + 1)
response.write "Dam: " & Dam & " on possible " & Dambns +3
%>
<br>
<%
Randomize
ArmBns = rs("Arm"
Arm = int((rnd * 3) + ArmBns + 1)
response.write "Arm: " & Arm & " on possible " & Armbns +3
%>
<br>
<%
Randomize
LifBns = rs("Lif"
Lif = int((rnd * 20) +LifBns + 1)
response.write "Lif: " & Lif & " on possible " &Lifbns +20
%>
<br>
<%
Randomize
StaBns = rs("Sta"
Sta = int((rnd * 20) + StaBns + 1)
response.write "Sta: " & Sta & " on possible " & Stabns +20
%>
<br>
<%
Randomize
WilBns = rs("Wil"
Wil = int((rnd * 20) + WilBns + 1)
response.write "Wil: " & Wil & " on possible " & Wilbns +20
%>
<br>
<%
Randomize
ChaBns = rs("Cha"
Cha = int((rnd * 20) +ChaBns + 1)
response.write "Cha: " & Cha & " on possible " & Chabns +20
%>
<br><br><br>
<div align=center><input type=submit name=cmdAccept value=Accept></div><br><br>
</body>
</form>
</html>
Thanx in advance
Phailak
I need help yet again, although I'm learning great stuff from here and I'm very gratefull. This is the situation:
I load this ASP page with numbers that appear at random (characteristics of a character)
Now I need two buttons, one that will accept the stats and go to menu.asp which I think I've managed to do.
Second one is a reroll button, which in fact should simply reload the screen to get new numbers. Can anyone help me on this? Should I use menu.asp to validate if user clicked the reroll button, what type should that button be?
This is what I have for my asp page, my menu.asp is not finish but if you need it to understand let me know
<%@ Language=VBScript %>
<html>
<form name=frmTT method=post action=menu.asp>
<head>
<title>Gladiators</title>
</head>
<body text="#000000" bgcolor="#C0C0C0" link="#0000EE" vlink="#FFFF99" alink="#FF0000">
<center><font size=+4>Creating your Gladiator's stats</font><font size=+4></font>
<p><font size=+2>Here you may reroll your stats as many times as you wish by pressing the reroll button</font>
<br><br><br>
<%
sql = "select * from races WHERE Race = '" & request.form("cmbRaces" & "'"
Set Conn = Server.CreateObject("ADODB.Connection"
Conn.Open "Glad"
Set rs = Server.CreateObject("ADODB.Recordset"
rs.Open sql, Conn
%>
<%
Dim Hit, Par, Dod, Dam, Arm, Att, Lif, Sta, Spd, Wil, Cha, HitBns, ParBns, DodBns, DamBns, ArmBns, AttBns, LifBns, StaBns, SpdBns, WilBns, ChaBns
Randomize
HitBns = rs("Hit"
Hit = int((rnd * 20) + HitBns + 1)
response.write "Hit: " & Hit & " on possible " & hitbns +20
%>
<br>
<%
Randomize
ParBns = rs("Par"
Par = int((rnd * 20) + ParBns + 1)
response.write "Par: " & Par & " on possible " & ParBns +20
%>
<br>
<%
Randomize
DodBns = rs("Dod"
Dod = int((rnd * 20) + DodBns + 1)
response.write "Dod: " & Dod & " on possible " & Dodbns +20
%>
<br>
<%
Randomize
DamBns = rs("Dam"
Dam = int((rnd * 3) +DamBns + 1)
response.write "Dam: " & Dam & " on possible " & Dambns +3
%>
<br>
<%
Randomize
ArmBns = rs("Arm"
Arm = int((rnd * 3) + ArmBns + 1)
response.write "Arm: " & Arm & " on possible " & Armbns +3
%>
<br>
<%
Randomize
LifBns = rs("Lif"
Lif = int((rnd * 20) +LifBns + 1)
response.write "Lif: " & Lif & " on possible " &Lifbns +20
%>
<br>
<%
Randomize
StaBns = rs("Sta"
Sta = int((rnd * 20) + StaBns + 1)
response.write "Sta: " & Sta & " on possible " & Stabns +20
%>
<br>
<%
Randomize
WilBns = rs("Wil"
Wil = int((rnd * 20) + WilBns + 1)
response.write "Wil: " & Wil & " on possible " & Wilbns +20
%>
<br>
<%
Randomize
ChaBns = rs("Cha"
Cha = int((rnd * 20) +ChaBns + 1)
response.write "Cha: " & Cha & " on possible " & Chabns +20
%>
<br><br><br>
<div align=center><input type=submit name=cmdAccept value=Accept></div><br><br>
</body>
</form>
</html>
Thanx in advance
Phailak