[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

07/01/2009 at 12:28AM PDT, ID: 24535620
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.1

Validate check box selection

Asked by Web_Admin in JavaScript, Java Server Pages (JSP)

Hi experts,

This is going to drive me crazy. i have my js that validates the count of selected check box. when i tried to print the length of the check box. it returns "undefined".
The check box is created dynamiclly from database. please chek my code
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
Js:
 
function MyContractsValidation(){
 
    alert('Enter');
alert('number of check box:'+document.theform.contractcb.length);    
 document.getElementById('message1').style.visibility = 'hidden';
   var checkbox_choices = 0;
   // Loop from zero to the one minus the number of checkbox button selections
   for (counter = 0; counter < document.theform.contractcb.length; counter++)
   {alert('Enter for loop');
      // If a checkbox has been selected it will return true (If not it will return false)
      if (document.theform.contractcb[counter].checked)
      {
         checkbox_choices = checkbox_choices + 1;
         alert("total check box: "+checkbox_choices);
         
      }
 
   }
 
html form:
 
 
    
    <form action="my_contracts.jsp" method="POST"  name="theform" onsubmit="return MyContractsValidation();">
 
        <input type="hidden" name="remove" value="remove">
        <input type="hidden" name="contractsSize" value="1">    
   
    
    
    
         <tr class="odd">
        <td width="2%" align="center" nowrap="nowrap" height="20">
        <input type="checkbox"  name=contractcb value="4"></td>
        <td width="48%" height="20">
        <a href="contract_details.jsp?id4">contract four</a></td>
        <td width="14%" align="center">
        CDD</td>
 
        <td width="17%" align="center">
        45646</td>
        <td width="15%" align="center">
        24-06-2009</td>
        
        <td width="2%" align="left" nowrap="nowrap">
            <div class='red_box'></div>
        </td>
        
    </tr>
 
    
</form>
[+][-]07/01/09 12:40 AM, ID: 24752217

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/01/09 12:42 AM, ID: 24752221

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/01/09 05:34 AM, ID: 24753614

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07/01/09 07:28 AM, ID: 24754676

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Java Server Pages (JSP)
Sign Up Now!
Solution Provided By: mplungjan
Participating Experts: 3
Solution Grade: A
 
 
 
Loading Advertisement...
20091111-EE-VQP-91 - Hierarchy / EE_QW_4_20070622