ragazzi, salve
come č possibile ke offline su IE la funzione di richiamo dell'XMLHTTP funzia OK, mentre online nč su firefox nč su IE da risultato?
questo č il codice
e lapagina HTML ke richiamacodice:var timeLoading; var textStatus; var arrayComponent=["MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","MICROSOFT.XMLHTTP.1.0","MICROSOFT.XMLHTTP.1","MICROSOFT.XMLHTTP"]; function selectObj () { var varObjNew=null; for(var cc=0;cc<arrayComponent.length;cc++){ try {varObjNew=new ActiveXObject(arrayComponent[cc]);break;}catch(c){varObjNew=null;} } if(typeof XMLHttpRequest!="undefined" || !varObjNew){ try{varObjNew=new XMLHttpRequest();}catch(e){alert("Impossibile create una connessione HTTP! Nessun componente XML installato! ("+e.message+")");} } return varObjNew; } function openXML(funcToCall,url,obj,typeResponse,typeSend,postValue) { if(typeof typeSend=="undefined" || typeSend.length<=0){typeSend="GET"} typeSend=typeSend.toUpperCase(); obj.open(typeSend,url,true); timeLoadingtemp=(new Date()).getTime(); if(typeSend=="POST"){obj.setRequestHeader("Content-Type","application/x-www-form-urlencoded");} obj.onreadystatechange=function(){ if(obj.readyState==4){ if (obj.status==200){ var txtR='txt';if(typeResponse=="xml"){txtR=obj.responseXML}else{txtR=obj.responseText}; timeLoading=((new Date()).getTime())-timeLoadingtemp;timeLoading=timeLoading/1000;timeLoading=timeLoading.toString()+" sec."; textStatus="Data Loaded"; funcToCall(txtR); }else{ alert("Status Error n."+obj.status); } } }; if(typeSend=="POST"){obj.send(postValue);}else{obj.send();} } // INIZIO CODICE MODIFICABILE function provaa(value){ document.write("loaded in"+timeLoading+" "+value); }
aiutatemi plzcodice:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="JavaScript" type="text/javascript" src="function.js"></script> <script language="JavaScript" type="text/javascript"> var fab=selectObj(); </script> </head> <body> <form action="" method="get"> <input name="tyegd" type="button" value="gdsgs" onclick="openXML(provaa,'http://www.google.it',fab,'txt','GET','');" /> </form> </body> </html>![]()
![]()
sembra si blocchi sull'OPEN


Rispondi quotando