Results 1 to 3 of 3

Thread: ASP problem - URGENT

  1. #1

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205

    Exclamation 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]
    -----------------------------------------

  2. #2
    Fanatic Member dongaman's Avatar
    Join Date
    Aug 2001
    Location
    xi'an
    Posts
    616
    Request.Form.Item("somestring") is right.
    What is "Count"?The expression "Request.Form.Countis" is illegal.
    So do Request.form(i).
    I am just aman.

  3. #3

    Thread Starter
    PowerPoster rjlohan's Avatar
    Join Date
    Sep 2001
    Location
    Sydney, Australia
    Posts
    3,205
    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
  •  



Click Here to Expand Forum to Full Width