php:

echo "&output=".$output['prova'];



as:

dati_output = dati.output;
trace("Caricato correttamente: "+dati_output);