Solved

checkbox

Posted on 2004-04-19
5
190 Views
Last Modified: 2013-12-16
Hi,
  If I have say 1000 checkbox and all have the same name, but different value. How do I know which is being checked? If you want to know I am coding my application in coldfusion.

Nick
0
Comment
Question by:SolverSurfer
5 Comments
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10864384
No you cannot differentiate unless you have different(unique) values for each checkbox.
All the name value pairs are sent to the page(action) seperated by commas.
0
 

Author Comment

by:SolverSurfer
ID: 10864422
I am viewing a page that was developed in ASP and all the checkbox name are all the same, but the value are different.
Upon selecting a list of checkbox and click on the display record buttong, it wouldn't then display the record that I have selected using the checkbox.

How would you construct an array of checkbox in CF?
0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 125 total points
ID: 10865127
First of all,
you need not create a page with same variable name. you can always create a page with different variable names.

for example, if you are looping you can include the iterator value with a string to make it a different variable,
s1,s2,s3,s4,s5...

I am not much of coldfusion programmer, but I assume it is just like any other server side scripting language...
0
 
LVL 2

Expert Comment

by:Vaishali_chaudhry
ID: 10866188
hi,
first of all why do u need to give same name to all checkboxex, usually this kind of a scenario is used with radio buttons where we give same names to all checkboxes which then show as radio buttons and the one selected will be returned,i agree with venkateshwarr .
0
 

Expert Comment

by:vstrugaru
ID: 10901555
Hello SolverSurfer,

My comment is extracted as a short explanation from different web sites with questions about working with checkboxex under CF.

If you have multiple checkboxes with the same name, whe you send the form you get the values separated by comma of the selected checkboxes.

1000 checkboxes with 1000 values - if you check 500 of them, you get a string of 500 values separated by comma.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
javascript to html map 8 62
Definitions and default visual studio colors 5 58
program a usb light to turn on when needed 6 48
Full Screen problem when auto scale IFRAME 2 60
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now