Updating two divs?

I believe, when you use link_to_remote with :update option, it expects HTML back (not javascript). Try removing :update option from link_to_remote.