multiple check box selections

Results 1 to 2 of 2

Thread: multiple check box selections

  1. #1
    Annie Guest

    Default multiple check box selections

    HI,<BR><BR>I am looking for some ideas.<BR>Basically, I need to display multiple products and its accessories from the database. I need to have a check box for each of the displayed products.<BR>The user can check on different products, and when he says submit,<BR>the shopping cart should have all the checked items.<BR><BR>Now my question is in ASP, how do I collect information from all the this possible.<BR><BR>Hope somebody helps me,<BR>Thanks,

  2. #2
    Lanky Guest

    Default RE: multiple check box selections

    Make all your checkboxes the same name<BR><BR>&#060;Input type=checkbox name=allthesamename value=productid1&#062;<BR>&#060;Input type=checkbox name=allthesamename value=productid2&#062;<BR>&#060;Input type=checkbox name=allthesamename value=productid3&#062;...<BR><BR>when you submit the form the request.form will but the form values for the check box into a comma separated string.<BR><BR>request.form("allthesamename") will display as <BR>productid1, productid2, productid3<BR><BR>Then just split the values using split or parse it.<BR><BR><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