add onchange or onclick to field in select

I'm using the following:

:onChange => remote_function(:url => {:action => 'choose_stylist'}, :with => "'stylist=' + value")

You might be able to do this:

:onChange => remote_function(edit_item_path, :with => "'item=' + value")

You might need to set up 'edit_item' in your controller to use params[:item] in this case - I'm not sure. I think that the ':with => stuff' is what you need, though.

-Kyle

Kyle wrote:

I'm using the following:

:onChange => remote_function(:url => {:action => 'choose_stylist'}, :with => "'stylist=' + value")

You might be able to do this:

:onChange => remote_function(edit_item_path, :with => "'item=' + value")

You might need to set up 'edit_item' in your controller to use params[:item] in this case - I'm not sure. I think that the ':with => stuff' is what you need, though.

-Kyle

On Mar 26, 5:43 am, "Abir B." <rails-mailing-l...@andreas-s.net>

The problem is that edit_item_path require an id, and must be written edit_item_path(id) so can someone tell me how change the route edit_item_path so that It does'nt require this param?? thanks

I wonder if it might be as simple as this:

:onChange => remote_function(edit_item_path(value))

?

-Kyle