Beginner help

3 views
Skip to first unread message

Jebos

unread,
Apr 14, 2010, 8:51:03 AM4/14/10
to jRails
Hi

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?

Reply all
Reply to author
Forward
0 new messages