Topic: Active record query linked with select box

I'm using an active record query to group values by type and average them. Each grouped type has a distinct average. I'm currently able to display all of the distinct averages. I plan to use javascript in conjunction with a select box to display only one average at a time. How should I set up my select box so that when a user selects a type from the drop down, it only displays the corresponding average from the query?

An example: There are 5 groups (Group A, B, C, D and E). Each group has multiple members that each get two scores. The average scores for each group as a whole are A: 65 & 40, B: 72 & 80, C: 73 & 65, D: 84 & 21, and E: 91 & 31. I'd like a user to be able to select a group from a dropdown and have the app only display the corresponding averages.

Last edited by bork121 (2013-06-07 15:43:56)