function handleHttpResponse() { if (http.readyState == 4) { if (http.status == 200) { if (http.responseText.indexOf('invalid') == -1) { // Armamos un array, usando la coma para separar elementos results = http.responseText.split(","); document.getElementById("Busqueda").innerHTML = http.responseText; enProceso = false; } } } } function handleHttpResponse2() { if (http1.readyState == 4) { if (http1.status == 200) { if (http1.responseText.indexOf('invalid') == -1) { // Armamos un array, usando la coma para separar elementos results = http1.responseText.split(","); document.getElementById("Busqueda").innerHTML = http1.responseText; enProceso1 = false; } } } } function handleHttpResponse3() { if (http3.readyState == 4) { if (http3.status == 200) { if (http3.responseText.indexOf('invalid') == -1) { // Armamos un array, usando la coma para separar elementos results = http3.responseText.split(","); document.getElementById("AgregaMarca").innerHTML = http3.responseText; enProceso3 = false; } } } } function CargaDatos(eje,page){ if (!enProceso && http) { //alert(eje +',' +page); var valor1=""; var valor2=""; var valor3=""; var valor = escape(document.getElementById("CbMarca").options[document.getElementById("CbMarca").selectedIndex].value); var valor1 = escape(document.getElementById("CbModelo").options[document.getElementById("CbModelo").selectedIndex].value); // var valor2 = escape(document.getElementById("CbCarroceria").options[document.getElementById("CbCarroceria").selectedIndex].text); //var valor3 = escape(document.getElementById("CbMotor").options[document.getElementById("CbMotor").selectedIndex].text); var url = "paginar.asp?eje="+ eje + "&page="+ page + "&Marca="+ valor+ "&Modelo="+ valor1 + "&Carroceria="+ valor2 + "&Motor="+ valor3; // alert(url); http.open("GET", url, true); http.onreadystatechange = handleHttpResponse; enProceso = true; http.send(null); } } function getHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } function getHTTPObject1() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } return xmlhttp; } function CargaBusqueda(){ if (!enProceso1 && http1) { var url = "busqueda.asp"; http1.open("GET", url, true); http1.onreadystatechange = handleHttpResponse2; enProceso1 = true; http1.send(null); } } function BuscaRegistro(){ if (!enProceso1 && http1) { //alert(eje +',' +page); var Marca = escape(document.getElementById("CbMarca").options[document.getElementById("CbMarca").selectedIndex].value); var Modelo = escape(document.getElementById("CbModelo").options[document.getElementById("CbModelo").selectedIndex].value); var Carroceria = escape(document.getElementById("CbCarroceria").options[document.getElementById("CbCarroceria").selectedIndex].value); /*var Motor = escape(document.getElementById("Motor").options[document.getElementById("Motor").selectedIndex].text); var Combustible = escape(document.getElementById("Combustible").options[document.getElementById("Combustible").selectedIndex].text); var Precio = escape(document.getElementById("Precio").options[document.getElementById("Precio").selectedIndex].text); var Puerta = escape(document.getElementById("Puerta").options[document.getElementById("Puerta").selectedIndex].text);*/ var url = "busqueda.asp?Marca="+ Marca + "&Modelo="+ Modelo+ "&Carroceria="+ Carroceria; //alert(url); // var url = "busqueda.asp"; //alert(document.getElementById("Marca").options[document.getElementById("Marca").selectedIndex].text); http1.open("GET", url, true); http1.onreadystatechange = handleHttpResponse2; enProceso1 = true; http1.send(null); } } function Orden(Col,Order,eje,page){ if (Col==1){ Valor1="mo.NombreM"; } if (Col==2){ Valor1="Km"; } if (Col==3){ Valor1="Precio"; } if (!enProceso && http) { //alert(eje +',' +page); // var valor = escape(document.getElementById("consignee").options[document.getElementById("consignee").selectedIndex].text); // var valor1 = escape(document.getElementById("busqueda").value); //var valor2 = escape(document.getElementById("proveedor").options[document.getElementById("proveedor").selectedIndex].text); //var valor3 = escape(document.getElementById("status").options[document.getElementById("status").selectedIndex].text); var url = "paginar.asp?eje="+ eje + "&page="+ page + "&By="+ Valor1 + "&orden="+ Order; //alert(url); http.open("GET", url, true); http.onreadystatechange = handleHttpResponse; enProceso = true; http.send(null); } } function Cantidad(eje,page){ if (Col==1){ Valor1="mo.NombreM"; } if (Col==2){ Valor1="Km"; } if (Col==3){ Valor1="Precio"; } if (!enProceso && http) { //alert(eje +',' +page); var valor1 = escape(document.getElementById("Cantidad").options[document.getElementById("Cantidad").selectedIndex].text); var url = "paginar.asp?eje="+ eje + "&page="+ page + "&Cantidad="+ Valor1; alert(url); http.open("GET", url, true); http.onreadystatechange = handleHttpResponse; enProceso = true; http.send(null); } } function AgregaMarca(Tipo,Id){ if (!enProceso3 && http3) { //alert(eje +',' +page); var valor1 = escape(document.getElementById("TxtMarca").text); if(Tipo==1) var url = "nuevaMarca.asp?Marca="+ Valor1; if(Tipo=2) var url = "nuevaMarca.asp?Marca="+ Valor1 +"&Id="+ Id; // alert(url); http3.open("GET", url, true); http3.onreadystatechange = handleHttpResponse3; enProceso3 = true; http3.send(null); } }