Created
January 31, 2013 11:24
-
-
Save geronimod/4682219 to your computer and use it in GitHub Desktop.
chunk of mecado publico js search
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------- | |
// BUSQUEDA de LICITACIONES | |
//----------------------------------- | |
function executeAcquisitionsSearch() { | |
var actionUrl = $('#urlBusqueda').val(); | |
var datosForm = $("#frm-search").serialize(); | |
$("#frm-search").validate(); | |
var isValid = jQuery('#frm-search').valid(); | |
if(!isValid) | |
return false; | |
if ($("#FechaDesde").datepicker("getDate") != null) { | |
if ($("#FechaHasta").datepicker("getDate") < $("#FechaDesde").datepicker("getDate")) { | |
$("#div_validaFechas").show(); | |
setTimeout(function () { | |
$('#div_validaFechas').hide(); | |
}, 4500); | |
return false; | |
} | |
else { | |
$("#div_validaFechas").hide(); | |
} | |
} else { | |
$("#div_validaFechas").hide(); | |
} | |
//setValuesToSearch(); | |
mostrarVistaResultados(false); | |
$.ajax({ | |
async: true, //Soluciona problema con Chrome | |
url: actionUrl, | |
type: "POST", | |
dataType: "json", | |
data: datosForm, | |
//contentType: "application/json; charset=utf-8", | |
contentType: "application/x-www-form-urlencoded; charset=UTF-8", | |
success: function (jsondata) { | |
$('#navegadores').html(jsondata.navegadoresHtml); | |
$('#resultados').html(jsondata.licitacionesHtml); | |
if (jsondata.statusCode == 0) { | |
return mostrarMsgError(jsondata.statusMessage); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment