Stripping form input length

Results 1 to 2 of 2

Thread: Stripping form input length

  1. #1
    Join Date
    Dec 1969

    Default Stripping form input length

    I am trying to strip the length of a set of input check boxes to just the first 3 values choosen. But when the value is greater than 3 I get an error message. How do I do this? I am using the code below:<BR><BR>MyVar1 = (request.form( "q1" )) & Space(3-Len(request.form("q1")))

  2. #2
    Join Date
    Dec 1969

    Default RE: Stripping form input length

    &nbsp;<BR>MyVar1 = (request.form( "q1" )) & Space(3-Len(request.form("q1")))<BR><BR>the above will give you the value of q1 then blank space the space function is used to set spaces between values when the value is greater than 3 you are trying to set a negative number of spaces (3-10=negative 7) that is why you get the error <BR><BR>if you have an object array i.e.(item1, item2, item3, item4) <BR><BR>then you can use a for loop to get the first 3 items from the array

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts