Results 1 to 2 of 2

Thread: Multiple Select Box Problems

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2000
    Location
    Dayton, OH USA
    Posts
    119
    Anyone have any ideas how to pass the selected items from a multi-select box to a new page. I am presently doing it with several text boxes with the querystring option but the multi-select box does not want to go.

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    142
    to have a multi-select box on a page do

    Code:
    <select name="whatever" multiple>
      <option value="1">first choice</option>
      <option value="2">second choice</option>
      <option value="3">third choice</option>
      <option value="4">fourth choice</option>
    </select>
    then on your handling page, the way (or A way) you get at all the selected values is:

    Code:
    myString = Request.Form("whatever")
    myArray = Split(myString, ", ", -1, 1)
    
    for i = LBound(myArray) to UBound(myArray)
    
      Response.Write myArray(i) & "<br>"
    
    next
    the split command will split a string into an array, here splitting on the ", "

    hope this helps, and good luck

    dvst8
    Secret to long life:
    Keep breathing as long as possible.

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