connection-min.js ( File view )

  • By zzhan08 2014-11-01
  • View(s):104
  • Download(s):0
  • Point(s): 2
			/*
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.6.0
*/
YAHOO.util.Connect={
_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{

},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{

},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{

},_timeOut:{

},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){
if(YAHOO.util.Event){
YAHOO.util.Event.addListener(document,"click",function(B){
var A=YAHOO.util.Event.getTarget(B);if(A.nodeName.toLowerCase()=="input"&&(A.type&&A.type.toLowerCase()=="submit")){
YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);
}
});return true;
}return false;
})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{
onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]
},setProgId:function(A){
this._msxml_progid.unshift(A);
},setDefaultPostHeader:function(A){
if(typeof A=="string"){
this._default_post_header=A;
}else{
if(typeof A=="boolean"){
this._use_default_post_header=A;
}
}
},setDefaultXhrHeader:function(A){
if(typeof A=="string"){
this._default_xhr_header=A;
}else{
this._use_default_xhr_header=A;
}
},setPollingInterval:function(A){
if(typeof A=="number"&&isFinite(A)){
this._polling_interval=A;
}
},createXhrObject:function(F){
var E,A;try{
A=new XMLHttpRequest();E={
conn:A,tId:F
};
}catch(D){
for(var B=0;B<this._msxml_progid.length;++B){
try{
A=new ActiveXObject(this._msxml_progid[B]);E={
conn:A,tId:F
};break;
}catch(C){

}
}
}finally{
return E;
}
},getConnectionObject:function(A){
var C;var D=this._transaction_id;try{
if(!A){
C=this.createXhrObject(D);
}else{
C={

};C.tId=D;C.isUpload=true;
}if(C){
this._transaction_id++;
}
}catch(B){

}finally{
return C;
}
},asyncRequest:function(F,C,E,A){
var D=(this._isFileUpload)?this.getConnectionObject(true):this.getConnectionObject();var B=(E&&E.argument)?E.argument:null;if(!D){
return null;
}else{
if(E&&E.customevents){
this.initCustomEvents(D,E);
}if(this._isFormSubmit){
if(this._isFileUpload){
this.uploadFile(D,E,C,A);return D;
}if(F.toUpperCase()=="GET"){
if(this._sFormData.length!==0){
C+=((C.indexOf("?")==-1)?"?":"&")+this._sFormData;
}
}else{
if(F.toUpperCase()=="POST"){
A=A?this._sFormData+"&"+A:this._sFormData;
}
}
}if(F.toUpperCase()=="GET"&&(E&&E.cache===false)){
C+=((C.indexOf("?")==-1)?"?":"&")+"rnd="+new Date().valueOf().toString();
}D.conn.open(F,C,true);if(this._use_default_xhr_header){
if(!this._default_headers["X-Requested-With"]){
this.initHeader("X-Requested-With",this._default_xhr_header,true);
}
}if((F.toUpperCase()==="POST"&&this._use_default_post_header)&&this._isFormSubmit===false){
this.initHeader("Content-Type",this._default_post_header);
}if(this._has_default_headers||this._has_http_headers){
this.setHeader(D);
}this.handleReadyState(D,E);D.conn.send(A||"");if(this._isFormSubmit===true){
this.resetFormState();
}this.startEvent.fire(D,B);if(D.startEvent){
D.startEvent.fire(D,B);
}return D;
}
},initCustomEvents:function(A,C){
var B;for(B in C.customevents){
if(this._customEvents[B][0]){
A[this._customEvents[B][0]]=new YAHOO.util.CustomEvent(this._customEvents[B][1],(C.scope)?C.scope:null);A[this._customEvents[B][0]].subscribe(C.customevents[B]);
}
}
},handleReadyState:function(C,D){
var B=this;var A=(D&&D.argument)?D.argument:null;if(D&&D.timeout){
this._timeOut[C.tId]=window.setTimeout(function(){
B.abort(C,D,true);
},D.timeout);
}this._poll[C.tId]=window.setInterval(function(){
if(C.conn&&C.conn.readyState===4){
window.clearInterval(B._poll[C.tId]);delete B._poll[C.tId];if(D&&D.timeout){
window.clearTimeout(B._timeOut[C.tId]);delete B._timeOut[C.tId];
}B.completeEvent.fire(C,A);if(C.completeEvent){
C.completeEvent.fire(C,A);
}B.handleTransactionResponse(C,D);
}
},this._polling_interval);
},handleTransactionResponse:function(F,G,A){
var D,C;var B=(G&&G.argument)?G.argument:null;try{
if(F.conn.status!==undefined&&F.conn.status!==0){
D=F.conn.status;
}else{
D=13030;
}
}catch(E){
D=13030;
}if(D>=200&&D<300||D===1223){
C=this.createResponseObject(F,B);if(G&&G.success){
if(!G.scope){
G.success(C);
}else{
G.success.apply(G.scope,[C]);
}
}this.successEvent.fire(C);if(F.successEvent){
F.successEvent.fire(C);
}
}else{
switch(D){
case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){
if(!G.scope){
G.failure(C);
}else{
G.failure.apply(G.scope,[C]);
}
}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){
if(!G.scope){
G.failure(C);
}else{
G.failure.apply(G.scope,[C]);
}
}
}this.failureEvent.fire(C);if(F.failureEvent){
F.failureEvent.fire(C);
}
}this.releaseObject(F);C=null;
},createResponseObject:function(A,G){
var D={

};var I={

};try{
var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E<F.length;E++){
var B=F[E].indexOf(":");if(B!=-1){
I[F[E].substring(0,B)]=F[E].substring(B+2);
}
}
}catch(H){

}D.tId=A.tId;D.status=(A.conn.status==1223)?204:A.conn.status;D.statusText=(A.conn.status==1223)?"No Content":A.conn.statusText;D.getResponseHeader=I;D.getAllResponseHeaders=C;D.responseText=A.conn.responseText;D.responseXML=A.conn.responseXML;if(G){
D.argument=G;
}return D;
},createExceptionObject:function(H,D,A){
var F=0;var G="communication failure";var C=-1;var B="transaction aborted";var E={

};E.tId=H;if(A){
E.status=C;E.statusText=B;
}else{
E.status=F;E.statusText=G;
}if(D){
E.argument=D;
}return E;
},initHeader:function(A,D,C){
var B=(C)?this._default_headers:this._http_headers;B[A]=D;if(C){
this._has_default_headers=true;
}else{
this._has_http_headers=true;

}
},setHeader:function(A){
var B;if(this._has_default_headers){
for(B in this._default_headers){
if(YAHOO.lang.hasOwnProperty(this._default_headers,B)){
A.conn.setRequestHeader(B,this._default_headers[B]);
}
}
}if(this._has_http_headers){
for(B in this._http_headers){
if(YAHOO.lang.hasOwnProperty(this._http_headers,B)){
A.conn.setRequestHeader(B,this._http_headers[B]);
}
}delete this._http_headers;this._http_headers={

};this._has_http_headers=false;
}
},resetDefaultHeaders:function(){
delete this._default_headers;this._default_headers={

};this._has_default_headers=false;
},setForm:function(M,H,C){
var L,B,K,I,P,J=false,F=[],O=0,E,G,D,N,A;this.resetFormState();if(typeof M=="string"){
L=(document.getElementById(M)||document.forms[M]);
}else{
if(typeof M=="object"){
L=M;
}else{
return ;
}
}if(H){
this.createFrame(C?C:null);this._isFormSubmit=true;this._isFileUpload=true;this._formNode=L;return ;
}for(E=0,G=L.elements.length;E<G;++E){
B=L.elements[E];P=B.disabled;K=B.name;if(!P&&K){
K=encodeURIComponent(K)+"=";I=encodeURIComponent(B.value);switch(B.type){
case"select-one":if(B.selectedIndex>-1){
A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);
}break;case"select-multiple":if(B.selectedIndex>-1){
for(D=B.selectedIndex,N=B.options.length;D<N;++D){
A=B.options[D];if(A.selected){
F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);
}
}
}break;case"radio":case"checkbox":if(B.checked){
F[O++]=K+I;
}break;case"file":case undefined:case"reset":case"button":break;case"submit"
...
...
(Please download the complete source code to view)
			
...
Expand> <Close

Want complete source code? Download it here

Point(s): 2

Download
0 lines left, continue to read
Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
01.97 kB
HelloWorld.exe32.50 kB2012-01-13|04:36
01.97 kB
01.97 kB
._HelloWorld.exe222.00 B2012-01-13|04:36
HelloWorld.sln886.00 B2011-06-21|02:15
._HelloWorld.sln222.00 B2011-06-21|02:15
HelloWorld.vcxproj3.20 kB2011-05-19|02:44
._HelloWorld.vcxproj222.00 B2011-05-19|02:44
HelloWorld.vcxproj.filters956.00 B2010-12-31|10:21
._HelloWorld.vcxproj.filters222.00 B2010-12-31|10:21
license.htm24.85 kB2012-01-26|11:20
._license.htm222.00 B2012-01-26|11:20
01.97 kB
cc-logo.jpg33.26 kB2012-01-26|11:20
01.97 kB
._cc-logo.jpg222.00 B2012-01-26|11:20
connection-min.js11.33 kB2012-01-26|11:20
._connection-min.js222.00 B2012-01-26|11:20
container-min.js71.26 kB2012-01-26|11:20
._container-min.js222.00 B2012-01-26|11:20
container.css4.58 kB2012-01-26|11:20
._container.css222.00 B2012-01-26|11:20
deed67.00 B2012-01-26|11:20
._deed222.00 B2012-01-26|11:20
deed.js1.57 kB2012-01-26|11:20
._deed.js222.00 B2012-01-26|11:20
deed.txt731.00 B2012-01-26|11:20
._deed.txt222.00 B2012-01-26|11:20
deed3-print.css2.49 kB2012-01-26|11:20
._deed3-print.css222.00 B2012-01-26|11:20
deed3.css13.55 kB2012-01-26|11:20
._deed3.css222.00 B2012-01-26|11:20
ga.js32.45 kB2012-01-26|11:20
._ga.js222.00 B2012-01-26|11:20
ga_002.js32.45 kB2012-01-26|11:20
._ga_002.js222.00 B2012-01-26|11:20
help.js4.68 kB2012-01-26|11:20
._help.js222.00 B2012-01-26|11:20
information.png778.00 B2012-01-26|11:20
._information.png222.00 B2012-01-26|11:20
json-min.js3.40 kB2012-01-26|11:20
._json-min.js222.00 B2012-01-26|11:20
jurisdictions.css841.00 B2012-01-26|11:20
._jurisdictions.css222.00 B2012-01-26|11:20
seal.png7.16 kB2012-01-26|11:20
._seal.png222.00 B2012-01-26|11:20
yahoo-dom-event.js30.90 kB2012-01-26|11:20
._yahoo-dom-event.js222.00 B2012-01-26|11:20
._license_files222.00 B2014-01-30|04:26
winmain.cpp4.66 kB2012-01-13|06:31
._winmain.cpp222.00 B2012-01-13|06:31
HelloWorld.vcxproj.user143.00 B2014-01-30|04:30
01.97 kB
HelloWorld.log1.99 kB2014-01-30|04:31
HelloWorld.vcxprojResolveAssemblyReference.cache713.00 B2014-01-30|04:31
HelloWorld.lastbuildstate106.00 B2014-01-30|04:31
HelloWorld.write.1.tlog0.00 B2014-01-30|04:31
vc100.idb179.00 kB2014-01-30|04:31
vc100.pdb60.00 kB2014-01-30|04:31
winmain.obj13.98 kB2014-01-30|04:31
CL.read.1.tlog7.23 kB2014-01-30|04:31
CL.write.1.tlog380.00 B2014-01-30|04:31
cl.command.1.tlog724.00 B2014-01-30|04:31
HelloWorld.ilk329.23 kB2014-01-30|04:31
mt.read.1.tlog924.00 B2014-01-30|04:31
HelloWorld.pdb371.00 kB2014-01-30|04:31
HelloWorld.exe.intermediate.manifest381.00 B2014-01-30|04:31
link.read.1.tlog2.85 kB2014-01-30|04:31
link.write.1.tlog1.03 kB2014-01-30|04:31
link.command.1.tlog1.53 kB2014-01-30|04:31
HelloWorld.exe28.50 kB2014-01-30|04:31
mt.write.1.tlog250.00 B2014-01-30|04:31
mt.command.1.tlog634.00 B2014-01-30|04:31
HelloWorld.suo8.50 kB2014-01-30|04:31
._HelloWorld222.00 B2014-01-30|04:31
Character0.00 B2014-01-30|04:36
Character33.00 kB2012-01-13|04:35
Character0.00 B2014-02-11|09:52
Character222.00 B2012-01-13|04:35
Character894.00 B2011-06-28|03:09
Character222.00 B2011-06-28|03:09
Character4.54 kB2010-01-29|04:49
Character222.00 B2010-01-29|04:49
Character943.00 B2010-01-08|14:18
Character222.00 B2010-01-08|14:18
Character24.85 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character0.00 B2014-01-30|04:27
Character33.26 kB2012-01-26|11:20
Character0.00 B2014-02-11|09:52
Character222.00 B2012-01-26|11:20
Character11.33 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character71.26 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character4.58 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character67.00 B2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character1.57 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character731.00 B2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character2.49 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character13.55 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character32.45 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character32.45 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character4.68 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character778.00 B2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character3.40 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character841.00 B2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character7.16 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character30.90 kB2012-01-26|11:20
Character222.00 B2012-01-26|11:20
Character222.00 B2014-01-30|04:27
Character5.60 kB2012-01-13|06:38
Character222.00 B2012-01-13|06:38
Character143.00 B2014-01-30|04:33
Character0.00 B2014-01-30|04:34
Character2.08 kB2014-01-30|04:34
Character111.00 B2014-01-30|04:34
Character0.00 B2014-01-30|04:33
Character179.00 kB2014-01-30|04:34
Character60.00 kB2014-01-30|04:34
Character15.78 kB2014-01-30|04:34
Character7.09 kB2014-01-30|04:34
Character400.00 B2014-01-30|04:34
Character744.00 B2014-01-30|04:34
Character946.39 kB2014-01-30|04:34
Character960.00 B2014-01-30|04:34
Character1.57 MB2014-01-30|04:34
Character381.00 B2014-01-30|04:34
Character2.88 kB2014-01-30|04:34
Character650.00 B2014-01-30|04:34
Character1.60 kB2014-01-30|04:34
Character388.50 kB2014-01-30|04:34
Character268.00 B2014-01-30|04:34
Character678.00 B2014-01-30|04:34
Character8.50 kB2014-01-30|04:36
._Character222.00 B2014-01-30|04:36
Keys0.00 B2014-01-30|04:27
Keys34.00 kB2012-01-13|04:37
Keys0.00 B2014-02-11|09:52
Keys222.00 B2012-01-13|04:37
Keys882.00 B2011-06-21|02:24
Keys222.00 B2011-06-21|02:24
Keys3.64 kB2010-01-08|14:18
Keys222.00 B2010-01-08|14:18
Keys943.00 B2010-01-08|14:18
Keys222.00 B2010-01-08|14:18
Keys24.85 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys0.00 B2014-01-30|04:27
Keys33.26 kB2012-01-26|11:20
Keys0.00 B2014-02-11|09:52
Keys222.00 B2012-01-26|11:20
Keys11.33 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys71.26 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys4.58 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys67.00 B2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys1.57 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys731.00 B2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys2.49 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys13.55 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys32.45 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys32.45 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys4.68 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys778.00 B2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys3.40 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys841.00 B2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys7.16 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys30.90 kB2012-01-26|11:20
Keys222.00 B2012-01-26|11:20
Keys222.00 B2014-01-30|04:27
Keys9.36 kB2012-01-13|06:38
Keys222.00 B2012-01-13|06:38
._Keys222.00 B2014-01-30|04:27
Prevent0.00 B2014-01-30|05:36
Prevent24.85 kB2012-01-26|11:20
Prevent0.00 B2014-02-11|09:52
Prevent222.00 B2012-01-26|11:20
Prevent0.00 B2014-01-30|04:28
Prevent33.26 kB2012-01-26|11:20
Prevent0.00 B2014-02-11|09:52
Prevent222.00 B2012-01-26|11:20
Prevent11.33 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent71.26 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent4.58 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent67.00 B2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent1.57 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent731.00 B2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent2.49 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent13.55 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent32.45 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent32.45 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent4.68 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent778.00 B2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent3.40 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent841.00 B2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent7.16 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent30.90 kB2012-01-26|11:20
Prevent222.00 B2012-01-26|11:20
Prevent222.00 B2014-01-30|04:28
Prevent5.14 kB2012-01-13|06:40
Prevent222.00 B2012-01-13|06:40
Prevent896.00 B2011-06-21|02:25
Prevent222.00 B2011-06-21|02:25
Prevent4.58 kB2011-05-19|02:41
Prevent222.00 B2011-05-19|02:41
Prevent951.00 B2011-05-19|02:41
Prevent222.00 B2011-05-19|02:41
Prevent10.00 kB2014-01-30|05:38
Prevent143.00 B2014-01-30|05:35
Prevent0.00 B2014-01-30|05:36
Prevent2.09 kB2014-01-30|05:36
Prevent713.00 B2014-01-30|05:36
Prevent112.00 B2014-01-30|05:36
Prevent0.00 B2014-01-30|05:36
Prevent179.00 kB2014-01-30|05:36
Prevent60.00 kB2014-01-30|05:36
Prevent15.32 kB2014-01-30|05:36
Prevent7.26 kB2014-01-30|05:36
Prevent420.00 B2014-01-30|05:36
Prevent780.00 B2014-01-30|05:36
Prevent381.00 B2014-01-30|05:36
Prevent2.91 kB2014-01-30|05:36
Prevent1.11 kB2014-01-30|05:36
Prevent1.61 kB2014-01-30|05:36
Prevent956.00 B2014-01-30|05:36
Prevent272.00 B2014-01-30|05:36
Prevent676.00 B2014-01-30|05:36
Prevent933.80 kB2014-01-30|05:36
Prevent1.57 MB2014-01-30|05:36
Prevent388.00 kB2014-01-30|05:36
._Prevent222.00 B2014-01-30|05:36
...
Sponsored links

connection-min.js (2.08 MB)

Need 2 point
Your Point(s)

Your Point isn't enough.

Get point immediately by PayPal

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more point

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D