Trigger the 'add more' button with javascript, to add a set amount of field values Is there any way to add a certain amount of field values to a standard node add/edit form (when unlimited option has been chosen) using a select input?

At the moment I have this working using javascript by triggering click on the 'add another' button, waiting a bit using setInterval (as the button disappears), then looping as many times as I need to, so the new fields gradually appear. This sort of works, but is very very dirty. Is there any proper way to add a certain number of field values based on a select option, and doesn't involved waiting?
I had the very similar problem, but with a group of fields that all needed to be added in sync. Using setTimeout to trigger is problematic because of the guess work involved.

One of the ways to do this is to use the ajaxSuccess event to chain a list of requests. After searching for a solution to my problem, I ended up creating a small plugin called group-add-more. This can work with both Drupal 6 as well as 7.