Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


form reloads

 
Logged in as: Guest
arrSession:exec spGetSession 2,4,46789
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP.NET >> form reloads
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 form reloads - 5/8/2007 5:13:45 AM   
  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

 
 
Post #: 1
 
 RE: form reloads - 5/11/2008 2:55:31 PM   
  TNO


Posts: 975
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
This still a problem? I can't duplicate. (FF3b5 & IE7)

_____________________________

Consolidated Script Component: Now in Testing stage!

A universe of complexity...

(in reply to ggoodwin)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP.NET >> form reloads Page: [1]
Jump to:





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
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts