[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.

Question
[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: javascript, cgi, html

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
mike
 
Loading Advertisement...
 
[+][-]05/14/08 03:05 PM, ID: 21569117Accepted Solution

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, 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/08 01:51 PM, ID: 21568566Expert Comment

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.

 
[+][-]05/14/08 01:52 PM, ID: 21568576Expert Comment

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.

 
[+][-]05/14/08 01:57 PM, ID: 21568625Expert Comment

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.

 
[+][-]05/14/08 02:13 PM, ID: 21568788Expert Comment

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.

 
[+][-]05/14/08 02:14 PM, ID: 21568794Expert Comment

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.

 
[+][-]05/14/08 02:18 PM, ID: 21568832Author Comment

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

 
[+][-]05/14/08 02:22 PM, ID: 21568862Expert Comment

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.

 
[+][-]05/14/08 02:33 PM, ID: 21568936Expert Comment

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.

 
[+][-]05/14/08 02:53 PM, ID: 21569066Author Comment

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

 
[+][-]05/14/08 04:28 PM, ID: 21569528Administrative Comment

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

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_2_20070628