Cerca nel supporto

Attenzione alle mail truffa. Mozilla non chiederà mai di chiamare o mandare messaggi a un numero di telefono o di inviare dati personali. Segnalare qualsiasi attività sospetta utilizzando l'opzione “Segnala abuso”.

Learn More

Questa discussione è archiviata. Inserire una nuova richiesta se occorre aiuto.

Problems with clearing files from input type="file"

  • Nessuna risposta
  • 5 hanno questo problema
  • 5 visualizzazioni
more options

I'm using ‹input type="file".. to upload files in some javascript.

The page containing the ‹input type="file".. is not reloaded, so data on the ‹input type="file".. is not cleared.

I've done this with form.reset() in IE, which cleares files from ‹input type="file".., but this doesn't work in Firefox. The next time I try to submit a file two files are submitted.

I've even tried to replace the ‹input type="file".. to clear all data, but if i replace it with a ‹input type="file".. with same id, the files is still there from before.

So my question is, how do I clear files selected

(Edited to make the HTML code display properly -TonyE)

I'm using ‹input type="file".. to upload files in some javascript. The page containing the ‹input type="file".. is not reloaded, so data on the ‹input type="file".. is not cleared. I've done this with form.reset() in IE, which cleares files from ‹input type="file".., but this doesn't work in Firefox. The next time I try to submit a file two files are submitted. I've even tried to replace the ‹input type="file".. to clear all data, but if i replace it with a ‹input type="file".. with same id, the files is still there from before. So my question is, how do I clear files selected ''(Edited to make the HTML code display properly -TonyE)''

Modificato da TonyE il