Solved

return values from achckbox

Posted on 2015-01-18
2
41 Views
Last Modified: 2015-01-19
I ha ve a form with 5 input checkboxes
<form name="forma" method="post" acrion="cotiza.asp">
<input type="checkbox" name="product" value="prod01">
<input type="checkbox" name="product" value="prod02">
<input type="checkbox" name="product" value="prod03">
<input type="checkbox" name="product" value="prod04">
<input type="checkbox" name="product" value="prod05">

Open in new window


When I send the form how can I determine which elements were checked without making specific reference to the values?

The form is dynamic and has many possible values. So it is impractical (or impossible) to check each value.

I am thinking of a array

Thx
0
Comment
Question by:robrodp
  • 2
2 Comments
 
LVL 77

Accepted Solution

by:
arnold earned 500 total points
ID: 40557131
Each checked checkbox will be sent as check_box_name=value_of_check_box
When you parse/process the response, you have to make sure you process checkbox cummulatively versus ......

in your case, if I checked product Values prod01 prod03 and prod05 the data stream will include the following:
product=prod01&product=prod03&product=prod05
0
 
LVL 77

Expert Comment

by:arnold
ID: 40557148
Advise if I might, the simplest thing is to have your dynamic pages have a DEBUG feature.
in this case, outputing the data stream your ASP gets will help identify an approach to do what you need.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question