|
-
Oct 17th, 2001, 08:09 PM
#1
Thread Starter
PowerPoster
ASP problem - URGENT
I have an .asp page which processes a form on another page.
This all works ok on my local machine (running PWS) but on the web server I upload it to I get an error at this point:
For i = RequestFormIndex to (Request.Form.Count)
answerArray(Request.Form.Item(i)) = True
Next
The form is an online quiz.
This section of code refers to a set of optionBox controls in the previous form. I have no problems processing a question using radio button controls, but the server doesn't like this bit of code for the option box question...
I have tried using
Request.form(i)
Request.form(i).Item
etc. but they all give me an error.
I know that Request.Form.Item("somestring") will work, but not this code.
HELP!
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Oct 17th, 2001, 09:18 PM
#2
Fanatic Member
Request.Form.Item("somestring") is right.
What is "Count"?The expression "Request.Form.Countis" is illegal.
So do Request.form(i).
-
Oct 17th, 2001, 09:28 PM
#3
Thread Starter
PowerPoster
Request.Form.Count is the number of fields/values which have been submitted. It is a legal term.
The problem I was having was that when you pass optionBox values, only those which have been selected are passed. I have solved my prob now, by creating a string to refer to the optionBoxes which were passed. I falsely assumed that I would get errors with this method, since not all the optionBoxes are passed. However, after trying everything else, I did this and it worked, so my prob is solved.
YAY!
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|