Maybe you are looking for Something like this..
[Edit] New version Ajax to Array fixed. In original version Tmp was not fully transfered to ArrayID and ArrayName [/edit]
thank you for your help, in the file that you provide, when the size of my array 5. and when the size becomes < 4, green object is not destroyed and text becomes 0.
and its order changed, not like before.
Can events like the picture below is performed only once? because if done repeatedly, then the order will be changed.