views:

49

answers:

1

I have a form where the user can dynamically add a new table row with fields. I'm using a simple insertCell/InsertRow with innerHTML to generate the new row. One of those form fields is using scriptaculous' ajax.autocompleter. I have it generating new IDs for all the elements, but it is still not working

The new row generated by js has the same source as the initial row of the form that loads at run time, however it does not appear to be calling the autocomplete function. I think my problem lies in that I don't understand when/how the "new Ajax.Autocompleter" is called.

Is it not possible to use ajax.autocompleter like this?

TIA

A: 

Figured it out, thanks to this.

http://proto-scripty.wikidot.com/prototype:how-to-load-scripts-dynamically