jQuery(document).ready(function(){ hCarousel = new UI.Carousel("horizontal_carousel"); //-- function GetCert() { var codcert = jQuery("#codcert").val(); jQuery.post( "/get_cert.php", { str1: codcert }, function(data){ if( data!="false" ){ document.location.href="/certificado/" + data; }else{ alert("Código de certificado inválido!"); } }); } jQuery("#btgetcert").click(function(){ GetCert(); }); });