Solved

checkbox

Posted on 2004-04-19
5
181 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
The purpose of this video is to demonstrate how to insert an Iframe into 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 : Open Page or Post…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

747 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

9 Experts available now in Live!

Get 1:1 Help Now