1//Parámetros: URLexterna = URL cuya respuesta se va a cargar 2//El contenido devuelto no debe incluir las etiquetas: html, body, head. 3//idContenedor = valor del campo 'id' donde se cargará la respuesta 4//imgLoading (opcional) = ruta de la imagen que se mostrará mientras se carga el contenido. 5//Ver imagenes de cargando en: http://www.ajaxload.info/ 6function cargarZonaAJAX(URLexterna, idContenedor, imgLoading) { 7 8 //Cargamos imagen de loading si procede 9 if (imgLoading != null && imgLoading != '') 10 document.getElementById(idContenedor).innerHTML = "<div align='center'><br><br><img src='"+imgLoading+"'/></div>"; 11 12 var httREQ; 13 14 if (window.XMLHttpRequest) { //Si es Mozilla... 15 httREQ = new XMLHttpRequest(); 16 }else{ 17 try { //Si es exporer versión actualizada... 18 httREQ = new ActiveXObject ("Msxml2.XMLHTTP"); 19 }catch (e) { //Si es exporer versión antigua... 20 httREQ = new ActiveXObject ("Microsoft.XMLHTTP"); 21 } 22 } 23 24 httREQ.onreadystatechange = function() { 25 if (httREQ.readyState == 4) 26 document.getElementById(idContenedor).innerHTML = httREQ.responseText; 27 }; 28 29 httREQ.open("GET", URLexterna, true); 30 httREQ.send(null); 31} 32 33function cargarZonaAJAX2(URLexterna, idContenedor, imgLoading) { 34 35 //Cargamos imagen de loading si procede 36 if (imgLoading != null && imgLoading != '') 37 document.getElementById(idContenedor).innerHTML = "<div align='center'><br><br><img src='"+imgLoading+"'/></div>"; 38 39 var httREQ; 40 41 if (window.XMLHttpRequest) { //Si es Mozilla... 42 httREQ = new XMLHttpRequest(); 43 }else{ 44 try { //Si es exporer versión actualizada... 45 httREQ = new ActiveXObject ("Msxml2.XMLHTTP"); 46 }catch (e) { //Si es exporer versión antigua... 47 httREQ = new ActiveXObject ("Microsoft.XMLHTTP"); 48 } 49 } 50 51 httREQ.onreadystatechange = function() { 52 if (httREQ.readyState == 4) 53 document.getElementById(idContenedor).innerHTML = httREQ.responseText; 54 }; 55 56 httREQ.open("POST", URLexterna, true); 57 httREQ.send(null); 58} 59 60function objetus(file) { 61 xmlhttp=false; 62 this.AjaxFailedAlert = "Su navegador no soporta las funciónalidades de este sitio y podria experimentarlo de forma diferente a la que fue pensada. Por favor habilite javascript en su navegador para verlo normalmente.\n"; 63 this.requestFile = file; 64 this.encodeURIString = true; 65 this.execute = false; 66 if (window.XMLHttpRequest) { 67 this.xmlhttp = new XMLHttpRequest(); 68 if (this.xmlhttp.overrideMimeType) { 69 this.xmlhttp.overrideMimeType('text/xml'); 70 } 71 } 72 else if (window.ActiveXObject) { // IE 73 try { 74 this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); 75 }catch (e) { 76 try { 77 this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); 78 } catch (e) { 79 this.xmlhttp = null; 80 } 81 } 82 if (!this.xmlhttp && typeof XMLHttpRequest!='undefined') { 83 this.xmlhttp = new XMLHttpRequest(); 84 if (!this.xmlhttp){ 85 this.failed = true; 86 } 87 } 88 } 89 return this.xmlhttp ; 90} 91function recibeid(_pagina,valorget,valorpost,capa){ 92 ajax=objetus(_pagina); 93 if(valorpost!=""){ 94 ajax.open("POST", _pagina+"?"+valorget+"&tiempo="+new Date().getTime(),true); 95 } else { 96 ajax.open("GET", _pagina+"?"+valorget+"&tiempo="+new Date().getTime(),true); 97 } 98 ajax.onreadystatechange=function() { 99 if (ajax.readyState==1){ 100 document.getElementById(capa).innerHTML = "<img src='images/ajax-loader.gif' align='center'>"; 101 } 102 if (ajax.readyState==4) { 103 if(ajax.status==200) 104 {document.getElementById(capa).innerHTML = ajax.responseText;} 105 else if(ajax.status==404) 106 { 107 capa.innerHTML = "La direccion no existe"; 108 } 109 else 110 { 111 capa.innerHTML = "Error: ".ajax.status; 112 } 113 } 114 } 115 if(valorpost!=""){ 116 ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); 117 ajax.send(valorpost); 118 } else { 119 ajax.send(null); 120 } 121}
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.