Errore: this._XmlHttp has no properties
File sorgente: ajax.js
Riga: 91
qual'è l'errore?![]()
vi posto il codice interessato....
il codice sopra è in un file esterno che includocodice:function ARRT (mode) { this._XmlHttp=false; this._Mode=(mode=='xml')?'responseXML':'responseText'; this.Error=this._SetObj(); this.Result=false; } ARRT.prototype._SetObj = function() { if(window.XMLHttpRequest) { this._XmlHttp = new XMLHttpRequest(); return false; }else if(window.ActiveXObject) { try{ this._XmlHttp = new ActiveXObject("MSXML2.XMLHTTP"); return false; } catch(e) { this._XmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); return false; } } return true; } ARRT.prototype.Request = function (url, dati, async) { if (!this.Error) { if (dati=='') {// Metodo GET this._XmlHttp.open('GET', url, async); }else {// Metodo POST this._XmlHttp.open("POST", url, async); this._XmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); this._XmlHttp.setRequestHeader("Content-length",dati.length); this._XmlHttp.setRequestHeader("Connection","close"); } this._XmlHttp.onreadystatechange = function() {if ( this._XmlHttp.readyState == 4 ) {if ( this._XmlHttp.status == 200 ) {this.Result = this._XmlHttp+'.'+this._Mode; } else {this.Error = this._XmlHttp.status; } } } this._XmlHttp.send(null) } }
e per chiamarla....
codice:<script language="Javascript"> function ajax(s) { r= new ARRT('text'); if (!r.Errore) r.Request('t.php?ciao=fra','',true); } </script>![]()

Rispondi quotando