Advertisement

05.14.2008 at 01:39PM PDT, ID: 23403060
[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.5

urgent - limit # of clicks allowed on check box & radio buttons

Asked by webdott in JavaScript, Hypertext Markup Language (HTML), Scripting Languages

Tags:

i have the following code that i need help reworking.

part 1
i want to only the user to only be able to click 3 check boxes or radio buttons.
but, if they change their mind, allow them to uncheck or unclick the radio button
and choose another answer.

part 2
i have other check  boxes and radio buttons that i do not want to effect the
the maximum of 3 clicks on the same page. i need to exclude these from the
maximum 3 click choice.

i hope you all can help.
here is my code:
<HTML>
 <HEAD>
 
  <TITLE>Untitled</TITLE>
  <SCRIPT TYPE="text/javascript">
      function checkChecked(obj)
      {
            var maxchecked = 3;
            var chkcount = 0;
            var els = obj.form.elements;
            for(var i=0; i<els.length; i++)
            {
                  if(els[i].tagName.toLowerCase() == 'input')
                  {
                        var typ = els[i].type.toLowerCase();
                        if((typ == 'checkbox' || typ =='radio'))
                        {
                              if(els[i].checked)
                              {
                                    chkcount++;
                              }
                              if(chkcount > maxchecked)
                              {
                                    obj.checked = false;
 alert('Sorry, you can select only ' + maxchecked + ' choices');
 break;
                              }
                        }
                  }
            }
      }
      </SCRIPT></HEAD>
 <BODY>
  <FORM NAME="myform">
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2">want only 3
    avaliable to click</FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2">[ must be able to
    unclick check box to make a new choice, but still limit to 3 checks ]</FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2"><INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio1" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio1" ONCLICK="checkChecked(this);" /></FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2"><INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio1" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio1" ONCLICK="checkChecked(this);" /></FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2"><INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=CHECKBOX ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio1" ONCLICK="checkChecked(this);" /> <INPUT TYPE=RADIO NAME="myradio1" ONCLICK="checkChecked(this);" /></FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2">do not want these
    to be limited</FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2"><INPUT TYPE=CHECKBOX NAME=" "> <INPUT TYPE=CHECKBOX NAME=" "> <INPUT TYPE=CHECKBOX NAME=" "> <INPUT TYPE=CHECKBOX NAME=" "> <INPUT TYPE=CHECKBOX NAME=" "> <INPUT TYPE=CHECKBOX NAME=" "></FONT></FONT></P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2"><!-- $MVD$:spaceretainer() --></FONT></FONT>&nbsp;</P>
   <P>
    <FONT FACE="Arial,Helvetica,Monaco"><FONT SIZE="2"><!-- $MVD$:spaceretainer() --></FONT></FONT>&nbsp;
   </FORM>
 </BODY>
</HTML>

thanks
mikeStart Free Trial
 
Loading Advertisement...
 
[+][-]05.14.2008 at 01:51PM PDT, ID: 21568566

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 01:52PM PDT, ID: 21568576

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 01:57PM PDT, ID: 21568625

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:13PM PDT, ID: 21568788

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:14PM PDT, ID: 21568794

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:18PM PDT, ID: 21568832

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]05.14.2008 at 02:22PM PDT, ID: 21568862

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:33PM PDT, ID: 21568936

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 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.14.2008 at 02:53PM PDT, ID: 21569066

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

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

 
[+][-]05.14.2008 at 03:05PM PDT, ID: 21569117

View this solution now by starting your 7-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, Hypertext Markup Language (HTML), Scripting Languages
Tags: javascript, cgi, html
Sign Up Now!
Solution Provided By: hielo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.14.2008 at 04:28PM PDT, ID: 21569528

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

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

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628