Torna al Thread

function getXMLHttp() { http_request = false; if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { } } else if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } } } if (!http_request) { alert('Giving up :( Cannot create an XMLHTTP instance'); return false; } else { return http_request; } } function faiquellochedevifare() { document.getElementById('div1').innerHTML = '<img src="immagine_loading.gif" alt="loading" /> Caricamento in corso...'; objHTTP = getXMLHttp() objHTTP.open("POST", "file_che_elaborerà_i_dati.aspx", "false"); objHTTP.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); objHTTP.onreadystatechange = function() { fineelab(); } objHTTP.send('parametro1=0&parametro2=0'); } function fineelab() { if (objHTTP.readyState == 4) { if (objHTTP.status == 200) { document.getElementById('div1').innerHTML = objHTTP.responseText; } } }
Copyright © dotNetHell.it 2002-2025
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5