![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Weird problem with VBscript. I have this code that I am using after posting a form: for each key in request.Form response.write "Choices for: " & session("UseID") & " Value: " & request.Form(Key) & " left " & UCase(left(Key,3)) & "<BR>" (I have this for debugging) If UCase(left(Key,3)) = "GRP" Then intCount = intCount + 1 (I do other 'real processing' here, I removed it for brevity) End if Next Essentially it checks to see if the KEY is a radio button group. This is the output: Choices for: Robert Value: Andy left GRP Choices for: Robert Value: Rhonda left GRP Choices for: Robert Value: Submit Form! left BTN Choices for: Robert Value: Harry left GRP Choices for: Robert Value: 25 left TXT Choices for: Robert Value: Alexis left GRP Should not be displaying (OR selecting) BTN or TXT. In tct (as far as I know, the Ucase statement should check for this. I've checked my form (which hasn't change in months) and just can't find the problem. I can't see the error, hopefully a younger set of eyes can see it. Thanks Alexis |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Weird problem with VBscript. Alexis Faren wrote: Quote: > I have this code that I am using after posting a form: > > for each key in request.Form > response.write "Choices for: " & session("UseID") & " Value: " & > request.Form(Key) & " left " & UCase(left(Key,3)) & "<BR>" (I have > this for debugging) > > If UCase(left(Key,3)) = "GRP" Then > intCount = intCount + 1 > > (I do other 'real processing' here, I removed it for brevity) > > End if > Next > > Essentially it checks to see if the KEY is a radio button group. > > This is the output: > > Choices for: Robert Value: Andy left GRP > Choices for: Robert Value: Rhonda left GRP > Choices for: Robert Value: Submit Form! left BTN > Choices for: Robert Value: Harry left GRP > Choices for: Robert Value: 25 left TXT > Choices for: Robert Value: Alexis left GRP > > Should not be displaying (OR selecting) BTN or TXT. .... All you are doing with the If statement is deciding whether or not to increment that intCount variable. You showed the output ... what was the expected output? A better place for this question might have .inetserver.asp.general PS. You can remove the name for the submit button to prevent it from being included in the Request. -- Microsoft MVP - ASP/ASP.NET - 2004-2007 Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Weird problem with VBscript. Thanks Bob, that's obviously what I missed. I put it where it belongs and now I get the output I was expecting. Also, thanks for the tip about the Submit Button. Alexis "Bob Barrows" <reb01501@xxxxxx> wrote in message news:%23wBjfwtuJHA.2248@xxxxxx Quote: > Alexis Faren wrote: Quote: >> I have this code that I am using after posting a form: >> >> for each key in request.Form >> response.write "Choices for: " & session("UseID") & " Value: " & >> request.Form(Key) & " left " & UCase(left(Key,3)) & "<BR>" (I have >> this for debugging) >> >> If UCase(left(Key,3)) = "GRP" Then >> intCount = intCount + 1 >> >> (I do other 'real processing' here, I removed it for brevity) >> >> End if >> Next >> >> Essentially it checks to see if the KEY is a radio button group. >> >> This is the output: >> >> Choices for: Robert Value: Andy left GRP >> Choices for: Robert Value: Rhonda left GRP >> Choices for: Robert Value: Submit Form! left BTN >> Choices for: Robert Value: Harry left GRP >> Choices for: Robert Value: 25 left TXT >> Choices for: Robert Value: Alexis left GRP >> >> Should not be displaying (OR selecting) BTN or TXT. > Why not? You have no code to prevent the data from being written to > response ... All you are doing with the If statement is deciding whether > or not to increment that intCount variable. > You showed the output ... what was the expected output? > > A better place for this question might have .inetserver.asp.general > > > PS. You can remove the name for the submit button to prevent it from being > included in the Request. > > -- > Microsoft MVP - ASP/ASP.NET - 2004-2007 > Please reply to the newsgroup. This email account is my spam trap so I > don't check it very often. If you must reply off-line, then remove the > "NO SPAM" > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Weird - Very weird annoying problem | General Discussion | |||
| weird problem | Vista General | |||
| weird problem | Vista General | |||
| weird problem | Vista performance & maintenance | |||
| Weird Problem | Vista mail | |||