| |
ggoodwin
Posts: 1
Score: 0
Joined: 5/8/2007
Status: offline
|
Hi, I have a form that should forward to another page, but if certain combinations of radio buttons are selected, it just reloads the page. For instance there are 5 questions with two radio buttons for each question. If this sequence of selections is made (1: 2nd button, 2: 1st button, 3: 1st button, 4: 2nd button, 5: 1st button), the page reloads. Thanks very much for any suggestions! Here is the URL for the form: http://www.nwcet.org/programs/cyberCareers/students/test/iquiz/intquizstep2.aspx?total=7 Below is the vbscript behind the html: Public Class IntQuizStep21 Inherits System.Web.UI.Page Protected WithEvents Button1 As System.Web.UI.WebControls.Button #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Acount, Bcount, Btotal, Total, i As Integer Total = CInt(Request.QueryString("total")) For i = 1 To 5 If Request.Form("q" & i) = "a" Then Acount = Acount + 1 ElseIf Request.Form("q" & i) = "b" Then Bcount = Bcount + 1 End If Next If Request.Form("sec") = 1 Then Acount = Acount * 5 ElseIf Request.Form("sec") = 2 Then Acount = Acount * 10 Bcount = Bcount * 6 End If Total = Total + Acount + Bcount If Total >= 10 And Total <= 20 Then Response.Redirect("intquizstep3.aspx?total=" & Total) ElseIf Total >= 22 And Total <= 32 Then Response.Redirect("intquizstep3a.aspx?total=" & Total) ElseIf Total >= 38 And Total <= 48 Then Response.Redirect("intquizstep3b.aspx?total=" & Total) ElseIf Total >= 50 Then 'And Total <= 60 Then Response.Redirect("intquizstep3c.aspx?total=" & Total) End If End Sub End Class
|
|