Solved

return values from achckbox

Posted on 2015-01-18
2
42 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 78

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 78

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

726 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