Link_to_remote

Hey,

I’m trying to create AJAX website with Rails. I ran into the following
problem:

I want to add a Song to my database. There is this _form.rhtml where I
can edit all Song’s attributes. Then I can click ‘Create’ and I’m
done. I want to switch this to AJAX. I thought about using
form_remote_tag, but it seems insufficient to me. One of Song’s
attributes is a list of lyrics authors. I edit this list as follows:
you can enter new author in a text field and press ‘Add’ or you can
click ‘Remove’ on any of existing authors. Unfortunately, to implement
this I’d have to use another remote form and I would land with nested

tags, which is prohibited. So... I think that maybe I could use link_to_remote or remote_function, but... I would somehow have to pull out text field values and send them as parameters of the link_to_remote. Can I do that? And how?

Thanks,

Mike

you can change form action to different by javascript…

with :
link_to “button”, “#”, :onclick = “document.forms.myform.action = ‘/
new/action’;”

OR if i am lost something:
you have Song.authors model ?
you can pass:
hidden_field “song”, “authors[]”, @song.authors
in this way ^.

Hmm, maybe my description was too complicated… I need this:

I have an in my page and I want to
include it’s value in an XML-RPC call performed by link_to_remote. How
can I do that?

Regards,

Mike