Topic: Finding number of options selected in multiple choice (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30939" title="Pages that link to Topic: Finding number of options selected in multiple choice (Page 1 of 1)" rel="nofollow" >Topic: Finding number of options selected in multiple choice <span class="small">(Page 1 of 1)</span>\

 
Nimmala
Obsessive-Compulsive (I) Inmate

From:
Insane since: Feb 2009

posted posted 04-02-2009 10:42

Hi i want to know how we can find out number options selected in multiple choice button.

DavidJCobb
Nervous Wreck (II) Inmate

From:
Insane since: Mar 2009

posted posted 04-02-2009 20:55

Multiple-choice button as in a set of checkboxes? Or as in a SELECT element that allows multiple selections?

----------------------

poi
Paranoid (IV) Inmate

From: Norway
Insane since: Jun 2002

posted posted 04-02-2009 23:16

and you didn't think that this was a sloved problem and the solution was already all over the interNets ?

yossiadmon
Obsessive-Compulsive (I) Inmate

From: Israel
Insane since: Sep 2009

posted posted 09-08-2009 14:00

I assume you are talking about SELECT item (you mentioned "options")

code:
function countSelectedItems(id){
              var opts=document.getElementById(id).options;
              var ret=0;
              for(var i=0;i<opts.length;i++) 
                  ret+=(opts[i].selected)?1:0;
              return ret;
          }

coach
Nervous Wreck (II) Inmate

From:
Insane since: May 2011

posted posted 05-31-2011 11:04
Edit TP: spam removed


Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu