I've got a form with some upload boxes, and I'd really like to add more boxes when the user clicks on a link, a la Gmail attachments. <%= link_to_function 'add another song',
"link_to_function" is the right way to do this.
2. Instead of making this inline, make this true AJAX, and a ruby variable can be incremented on the remote side.
Refer to this excellent screencast which does something similar to what you are trying to do.
You are right. Making a round trip to the server using Ajax is overkill for adding a form element.
hth ponnada