1function crearXMLHttpRequest() 2{ 3 var xmlHttp=null; 4 if (window.ActiveXObject) 5 xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 6 else 7 if (window.XMLHttpRequest) 8 xmlHttp = new XMLHttpRequest(); 9 return xmlHttp; 10} 11 12function FAjax (url,capa,valores,metodo){ 13 var ajax=crearXMLHttpRequest(); 14 var capaContenedora = document.getElementById(capa); 15 16 /*Creamos y ejecutamos la instancia si el metodo elegido es POST*/ 17 if(metodo.toUpperCase()=='POST'){ 18 ajax.open ('POST', url, true); 19 ajax.onreadystatechange = function() { 20 if (ajax.readyState==1) { 21 capaContenedora.innerHTML="Cargando......."; 22 }else if (ajax.readyState==4){ 23 if(ajax.status==200){ 24 document.getElementById(capa).innerHTML=ajax.responseText; 25 }else if(ajax.status==404){ 26 capaContenedora.innerHTML = "La direccion no existe"; 27 }else{ 28 capaContenedora.innerHTML = "Error: ".ajax.status; 29 } 30 } 31 } 32 ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); 33 ajax.send(valores); 34 return; 35 } 36 /*Creamos y ejecutamos la instancia si el metodo elegido es GET*/ 37 if (metodo.toUpperCase()=='GET'){ 38 ajax.open ('GET', url, true); 39 ajax.onreadystatechange = function() { 40 if (ajax.readyState==1) { 41 capaContenedora.innerHTML="Cargando......."; 42 }else if (ajax.readyState==4){ 43 if(ajax.status==200){ 44 document.getElementById(capa).innerHTML=ajax.responseText; 45 }else if(ajax.status==404){ 46 capaContenedora.innerHTML = "La direccion no existe"; 47 }else{ 48 capaContenedora.innerHTML = "Error: ".ajax.status; 49 } 50 } 51 } 52 ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); 53 ajax.send(null); 54 return 55 } 56} 57 58
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.