form reloads

Author Message
ggoodwin

  • Total Posts : 1
  • Scores: 0
  • Reward points : 0
  • Joined: 5/8/2007
  • Status: offline
form reloads Tuesday, May 08, 2007 6:13 AM (permalink)
0
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

 
#1
    TNO

    • Total Posts : 2094
    • Scores: 36
    • Reward points : 0
    • Joined: 12/18/2004
    • Location: Earth
    • Status: offline
    RE: form reloads Sunday, May 11, 2008 3:55 PM (permalink)
    0
    This still a problem? I can't duplicate. (FF3b5 & IE7)
    To iterate is human, to recurse divine. -- L. Peter Deutsch
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9