I'm trying to get a select box - to trigger a server side save.
I used to use
# Accepts an id for the dropdown (to be passed on to remote function
# Displays the pairing options in a drop_down list and associates
with remote update
def show_drop_down(update_position)
pairing_options = [
["Yes", 'y'],
["-", 'm'],
["No", 'n'],
]
#@combinations += 1
name = "drop_" + update_position.to_s
select_tag name, options_for_select(pairing_options, :selected =>
'Y'),
{ :onchange =>
remote_function(
:url => {
:action => 'pair',
:escape => 'false',
:update_grid_item => update_position,
:with => "'value=' + this.value"
}
)
}
end
which has remote_function.
What is the simplest way to dynamically make all dropdown items in a
select submit to a server?