prova così:

codice:
document.forms['frmfattura'].elements['data'].value = new String(data);
ciao