Multiple options from a form object into a dynamic

Results 1 to 2 of 2

Thread: Multiple options from a form object into a dynamic

  1. #1
    Jim ( Guest

    Default Multiple options from a form object into a dynamic

    I&#039;m wondering if someone already has a method for accomplishing the following task...<BR><BR>I have an HTML page with a form on it, and this form has a single object. It is a &#060;select&#062; object with 5 options, and the user can make multiple selections from these options.<BR><BR>If the user selects 3 options, the value sent to the ASP page after submitting the form looks like "OPTION1, OPTION2, OPTION3"<BR><BR>I&#039;m wondering if there is a way to take each of the options that the user selects and break them apart into 3 variables which then can be used to build SQL statements to get data from a database.<BR><BR>The full form that I intend to implement this on has several &#060;select&#062; objects on it. They vary from 3 options to 40 options. My first thought was the best way to accomplish this would be to somehow extract each option in the result string and stuff it into a dynamic variable array, and then use each variable created to build the sql statements. I&#039;m trying to account for an unlimited number of options from each &#060;select&#062; object in the form so the users are not limited as to how many options they can search for. I know I can accomplish what I need by putting multiple &#060;select&#062; objects for each search item, but that leads to a very cluttered form and limits the number of selections a user can make. Obviously you would want to let the user select 40 options from one drop down (say, 40 colors from a list of 60 colors) rather than having them select one color from 40 drop down menus on the form.<BR><BR>I just have no idea how to break the string apart and stuff those parts into variables. I&#039;m not even sure that it can be done, any help would be really appreciated.

  2. #2
    Join Date
    Dec 1969

    Default ASPFAQs, Category: Database, Queries

    The link to the ASPFAQs is at the top right corner of most every page on this site. Try it some time!<BR><BR>In this case:<BR><BR>

Posting Permissions

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