Prova ad usare questo codice che è più snello e non setta header
Cavicchi Andrea Problemi con javascript, jquery, ajax clicca qui
Regole del Forum