SEI UN GRANDE!!!
Funziona perfettamente!!!
Maledetta Microsoft che fa tutto per i cavoli suoi...
Sono in debito con te, stavo veramente abbandonando l'idea e mi hai riaperto mille strade!
Se può servire, lascio la mia funzione, che può essere inserita nell'attributo action del form che spedisce i file!
Questa versione non elimina l'iframe creato, lo lascia invisibile incollato in fondo al documento.
codice:
function ajaxLikeUpload(idForm) {
var form = document.getElementById(idForm);
if(form.getAttribute("enctype") != "multipart/form-data")
form.setAttribute("enctype", "multipart/form-data");
form.setAttribute("target", "iframeAjaxLike");
if(!document.getElementById("iframeAjaxLike")) { // se non c'e' gia'
var iframe = null;
try { // per Explorer
iframe = document.createElement("<iframe name='iframeAjaxLike'>");
}catch(e){}
if(!iframe || iframe.nodeName.toLowerCase() != "iframe") iframe = document.createElement("iframe"); // tutti gli altri
iframe.setAttribute("id", "iframeAjaxLike");
iframe.setAttribute("name", "iframeAjaxLike");
iframe.style.display = "none";
document.body.appendChild(iframe);
}// altrimenti forzo l'attributo name
else document.getElementById("iframeAjaxLike").setAttribute("name", "iframeAjaxLike");
form.submit();
}
ORA TUTTO E' RISOLTO,
GRAZIE ANCORA!!