Topic: Update page content based on menu selection
In one of my views I have a drop down menu that goes like this:
<%= select_tag :name, options_for_select(@names) %>
@names is an array created in my controller and lets say it contains [John, George, Bill].
My problem is that I need to display, lets say John's attributes, as soon as the user clicks on him right under the menu box.
All the solutions I found googling around, for dynamic update of the page content, where static (hardcoded), but my data's size is prohibitive to a static solution.
For convenience lets say the database contains
name: John | George | Bill
attribute1: 20 | 30 | 26
attribute2: 1.68 | 1.8 | 1.76
attribute3: 70 | 90 | 100
P.S.: Hope this is the correct section of the forum:)
Last edited by avlach (2012-02-11 01:45:47)