function _sd_Post(Url, Args) 
{ 
 var xmlhttp; 
 var error; 
 eval('try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {xmlhttp = null;error=e;}'); 
 if(null != xmlhttp) 
 { 
 xmlhttp.Open("POST", Url, false); 
 xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 
 xmlhttp.Send(Args); 
 strText = xmlhttp.responseText; 
 // if our response starts with http than redirect there 
 if ( strText != null && strText.toLowerCase().indexOf("http") == 0 ) 
 { 
 location.href = strText; 
 } 
 } 
 else 
 { 
 location.href = c_errorUrl; 
 } 
 return strText; 
} 
function GetActionUrl(listKey) 
{ 
 return document.getElementById("ActionUrl:" + listKey).url 
} 


Solution Title: Microsoft.XMLHTTP sending a file  
asked by mikevandike on 09/15/2004 04:21PM PDT   
  
  



 
File Send 
 
    
   
Ready

网上找的。。。

Comments are closed.

Post Navigation