... c'è un errore:

if (statusAggiungi=0) {

= è un operatore di assegnazione, non di confronto. Andrebbe usato ==.

Ciao !