?
Solved

Checkbox count

Posted on 2003-02-25
6
Medium Priority
?
917 Views
Last Modified: 2012-08-14
how do I get a count of the total number of checkboxes checked in a table?  I currently have a listing of records that display 20 per page and am using rs.RecordCount to count the total number of records. below is the code for the checkbox.

<%x_Printed = rs("Printed")%>
<input type="checkbox" disabled <%if (x_printed)=true then%>
checked value="True" >
<%else%>
>
<%end if%>
0
Comment
Question by:markneelon
[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
6 Comments
 
LVL 4

Expert Comment

by:farzinm
ID: 8020570
You can have a variable to count
like this
<%
Dim count
count=0
x_Printed = rs("Printed")%>
<input type="checkbox" disabled <%if (x_printed)=true then
 count=count+1%>
checked value="True" >
<%else%>
>
<%end if%>
<%Response.write "Total checkbox count " & count%>
0
 
LVL 7

Accepted Solution

by:
chisholmd earned 200 total points
ID: 8020657
Do the checkboxes all have the same name?  Because once the form has been submitted you can use:

x = request.form("myCheckboxes").count

This will count only the checkboxes that have been checked because unchecked boxes do not return a name-value pair.

Dave

0
 
LVL 15

Expert Comment

by:gladxml
ID: 8023061
markneelon,

Maybe this link might help...

http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_20450556.html

HAppy programming...
0
 

Expert Comment

by:CleanupPing
ID: 9576857
markneelon:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 58

Expert Comment

by:Gary
ID: 9753843
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept Answer by chisholmd

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
GaryC123
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

771 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