Topic: Finding number of options selected in multiple choice (Page 1 of 1) Pages that link to <a href="http://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

IP logged posted posted 04-02-2009 10:42 Edit Quote

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

IP logged posted posted 04-02-2009 20:55 Edit Quote

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

IP logged posted posted 04-02-2009 23:16 Edit Quote

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

IP logged posted posted 09-08-2009 14:00 Edit Quote

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

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


Post Reply
 
Your User Name:
Your Password:
Login Options: Remember Me On This Computer
 
Your Text:
Loading...
Options: Show Signature
Enable Slimies
Enable Linkwords

« BackwardsOnwards »

Show Forum Drop Down Menu