All pastes #364487 Raw Edit

Ophiocus

public java v1 · immutable
#364487 ·published 2007-02-20 05:31 UTC
rendered paste body
//------------------------------------------------//           getHTTPObject()//------------------------------------------------function getHTTPObject() { 				if (typeof XMLHttpRequest != 'undefined') {					return new XMLHttpRequest(); 				}				try { 					return new ActiveXObject("Msxml2.XMLHTTP");				}				catch (e) {					try { 						return new ActiveXObject("Microsoft.XMLHTTP"); 					} 					catch (e) {					}				} 				return false; }//              getCall(param1,valores)////---------------------------------------------//-------ATENTION getCall 2.0 with multiple targetingfunction getCall(param1,valores,target){				multitarget=document.getElementById(target);				var checkformstatus="";				var triform="";				if (valores != null){					tryform=document.forms[valores];					if (tryform != null){						alert("found form object "+tryform);						alert(tryform+" Should be sent here to parser ");					}				}				var postdata="";				//Use getHTTPObject				var http = getHTTPObject();				//If you have values to pass along as POST				http.open("POST", param1, true);				http.onreadystatechange = function() {							var textin=multitarget;							//var textin=document.getElementById("centraltag");							if (http.readyState == 4) { 								//----------------------------------								//THE PAGE IS NOW READY FOR DISPLAY								//----------------------------------								var textout = " "+http.responseText;								//textout=document.createTextNode(textout);								textout=escape(textout);								fading(target,textout,0);								//textin.innerHTML=textout; 		   						//	document.write(textout); 								//alert(textout);							}else{								des=http.readyState;								var cargando_string="<div background=\"img/tagfondo/tagfondo_13.jpg\"><h3>CARGANDO"+ des +"</h3>";								cargando_string=escape(cargando_string);								if(!document.all){									fading(target,cargando_string,1);								}else{									textin.innerHTML ="<h3>CARGANDO"+ des +"</h3>";								//alert(des);								}							}											} 					if (tryform != null){						alert(valores+ "is a valid form, \n get the form ready");						postdata=getformready(valores);						//check to see what is in postdata						//CHECK FOR ERRORS IN FORM							if (postdata=="DONOTSEND"){								//DO NOTHING 								alert ("sending ABORTED");							}else{								//USE DATA AND SEND								alert(" ran for postdata "+postdata+" so we use setRequestHeader");								http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');								http.send(postdata);							}					}else{						//SEND WITHOUT DATA						alert (" there is no postdata to fetch");						http.send(null);					}					//End using HTTPObject}//-------------------------------------------------//---------------END---------------------getCall(param1,valores)//-------------------------------------------------