Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

return values from achckbox

Posted on 2015-01-18
2
Medium Priority
?
52 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 80

Accepted Solution

by:
arnold earned 2000 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 80

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

877 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