Topic: Finding number of options selected in multiple choice (Page 1 of 1)  | 
  |
|---|---|
| 
       Obsessive-Compulsive (I) Inmate From:   | 
    
       
  posted 04-02-2009 10:42
      
      Hi i want to know how we can find out number options selected in multiple choice button.  | 
  
| 
       Nervous Wreck (II) Inmate From:   | 
    
       
  posted 04-02-2009 20:55
      
      
     | 
  
| 
       Paranoid (IV) Inmate From: Norway  | 
    
       
  posted 04-02-2009 23:16
      
      
     | 
  
| 
       Obsessive-Compulsive (I) Inmate From: Israel  | 
    
       
  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;
          } | 
  
| 
       Nervous Wreck (II) Inmate From:   | 
    
       
  posted 05-31-2011 11:04
      
      Edit TP: spam removed 
     |