Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function muestra() {
- if ($("#maximo").val() - $("#minimo").val() < $("#cantidad").val()-1) {
- $("#resultado").html('La cantidad de numeros a extraer supera la cantidad a sortear');
- }
- else {
- $.getJSON(
- "muestra.php?minimo="+$("#minimo").val()+"&maximo="+$("#maximo").val()+"&cantidad="+$("#cantidad").val()
- ).done(function(d) {
- var resultado = d.resultado;
- var numero = [];
- var nombre = [];
- var div = '<table id="table_result">';
- var datos_sube = '<table id="table_datos_sube" style="display: none; ">';
- for (var i=0; i<resultado.length; i++) {
- div = div + "<tr><td class='td1'>"+(i+1)+"</td><td> <img src='images/pico.png' height='15'> </td><td class='td2'><p>" +resultado[i]['id']+ "</p></td></tr>";
- numero[i] = resultado[i]['numero'];
- nombre[i] = resultado[i]['nombre'];
- datos_sube = datos_sube + "<tr><td class='td2'><a onClick=\"abrir('"+numero[i]+"','"+nombre[i]+"')\">"+numero[i]+ "</a></td></tr>";
- }
- datos_sube = datos_sube + '</table>';
- div = div + '</table>';
- $("#resultado").html(div);
- $("#datos_sube").html(datos_sube);
- $("#verGanadores").css("display","");
- });
- }
- }
- function abrir(numero, nombre) {
- $.colorbox({iframe: true, innerWidth:689, innerHeight:434, href:"verTarjeta.php?numero="+numero+"&nombre="+nombre}).show();
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement