Skip to main content
se añadieron 3385 caracteres en el cuerpo
Origen Enlace
" type="text/javascript" >
function salida()
{        
       $.ajax({
        url: '../reportes/cufinn',
        type: 'POST',
        dataType: 'json',
          data:{
            datos:'where estatus=0'
        },
    })
    .done(function(data) {

       for (i = 0; i <=data.length; i++) {
          if((i % 2)=== 0)
            {
            var c=' bgcolor= "#E0ECF8"';
            }
            else
            {
            var c='';
            }
           $("#datos1").append('<tr>'+
            '<td>'+data[i]['ejercicio']+'</td>'+
            '<td>'+data[i]['periodo']+'</td>'+
            '<td>'+data[i]['Movimientoef'].toUpperCase()+'</td>'+
            '<td>'+data[i]['Perdidaf']+'</td>'+
            '<td>'+data[i]['Perdidaa']+'</td>'+
            '<td>'+data[i]['Resultadof']+'</td>'+
            '<td>'+data[i]['PTUPP']+'</td>'+
            '<td>'+data[i]['PTUCC']+'</td>'+
            '<td>'+data[i]['ISRR']+'</td>'+
            '<td>'+data[i]['Nod']+'</td>'+
            '<td>'+data[i]['UFINN']+'</td>'+
            '<td>'+data[i]['difec']+'</td>'+
            '<td>'+data[i]['SaldosA']+'</td>'+
            '<td>'+data[i]['INPCMM']+'</td>'+
            '<td>'+data[i]['INPCFAA']+'</td>'+
            '<td>'+data[i]['Fact']+'</td>'+
            '<td>'+data[i]['SaldoAAc']+'</td>'+
            '<td>'+data[i]['Divp']+'</td>'+
            '<td>'+data[i]['SaldoTT']+'</td>'+
            '</tr>');
        }
    });  
   //alert("Cuin");
}

   function salida2()
       {        
        $.ajax({
        url: '../reportes/cufinn',
         type: 'POST',
        dataType: 'json',
          data2:{
            datos:'where estatus=1'
        },
    })
    .done(function(data2) {

       for (i = 0; i <=data2.length; i++) {
          if((i % 2)=== 0)
            {
            var c=' bgcolor= "#E0ECF8"';
            }
            else
            {
            var c='';
            }
           $("#datos2").append('<tr>'+
            '<td>'+data2[i]['ejercicio']+'</td>'+
            '<td>'+data2[i]['periodo']+'</td>'+
            '<td>'+data2[i]['Movimientoef'].toUpperCase()+'</td>'+
            '<td>'+data2[i]['Perdidaf']+'</td>'+
            '<td>'+data2[i]['Perdidaa']+'</td>'+
            '<td>'+data2[i]['Resultadof']+'</td>'+
            '<td>'+data2[i]['PTUPP']+'</td>'+
            '<td>'+data2[i]['PTUCC']+'</td>'+
            '<td>'+data2[i]['ISRR']+'</td>'+
            '<td>'+data2[i]['Nod']+'</td>'+
            '<td>'+data2[i]['UFINN']+'</td>'+
            '<td>'+data2[i]['difec']+'</td>'+
            '<td>'+data2[i]['SaldosA']+'</td>'+
            '<td>'+data2[i]['INPCMM']+'</td>'+
            '<td>'+data2[i]['INPCFAA']+'</td>'+
            '<td>'+data2[i]['Fact']+'</td>'+
            '<td>'+data2[i]['SaldoAAc']+'</td>'+
            '<td>'+data2[i]['Divp']+'</td>'+
            '<td>'+data2[i]['SaldoTT']+'</td>'+
            '</tr>');
        }
    });  
    alert("Cuin");
}


        <script onload="salida()" src="<?php echo base_url("/_js/fixed_table_rc.js");?>" type="text/javascript" ></script>
<script onload="salida2()" src="<?php echo base_url("/_js/fixed_table_rc2.js");?>" type="text/javascript" ></script>
<script src="<?php echo base_url("/_js/build.js");?> "></script>
" type="text/javascript" >
<script onload="salida2()" src="<?php echo base_url("/_js/fixed_table_rc2.js");?>" type="text/javascript" ></script>
<script src="<?php echo base_url("/_js/build.js");?> "></script>
function salida()
{        
       $.ajax({
        url: '../reportes/cufinn',
        type: 'POST',
        dataType: 'json',
          data:{
            datos:'where estatus=0'
        },
    })
    .done(function(data) {

       for (i = 0; i <=data.length; i++) {
          if((i % 2)=== 0)
            {
            var c=' bgcolor= "#E0ECF8"';
            }
            else
            {
            var c='';
            }
           $("#datos1").append('<tr>'+
            '<td>'+data[i]['ejercicio']+'</td>'+
            '<td>'+data[i]['periodo']+'</td>'+
            '<td>'+data[i]['Movimientoef'].toUpperCase()+'</td>'+
            '<td>'+data[i]['Perdidaf']+'</td>'+
            '<td>'+data[i]['Perdidaa']+'</td>'+
            '<td>'+data[i]['Resultadof']+'</td>'+
            '<td>'+data[i]['PTUPP']+'</td>'+
            '<td>'+data[i]['PTUCC']+'</td>'+
            '<td>'+data[i]['ISRR']+'</td>'+
            '<td>'+data[i]['Nod']+'</td>'+
            '<td>'+data[i]['UFINN']+'</td>'+
            '<td>'+data[i]['difec']+'</td>'+
            '<td>'+data[i]['SaldosA']+'</td>'+
            '<td>'+data[i]['INPCMM']+'</td>'+
            '<td>'+data[i]['INPCFAA']+'</td>'+
            '<td>'+data[i]['Fact']+'</td>'+
            '<td>'+data[i]['SaldoAAc']+'</td>'+
            '<td>'+data[i]['Divp']+'</td>'+
            '<td>'+data[i]['SaldoTT']+'</td>'+
            '</tr>');
        }
    });  
   //alert("Cuin");
}

   function salida2()
       {        
        $.ajax({
        url: '../reportes/cufinn',
         type: 'POST',
        dataType: 'json',
          data2:{
            datos:'where estatus=1'
        },
    })
    .done(function(data2) {

       for (i = 0; i <=data2.length; i++) {
          if((i % 2)=== 0)
            {
            var c=' bgcolor= "#E0ECF8"';
            }
            else
            {
            var c='';
            }
           $("#datos2").append('<tr>'+
            '<td>'+data2[i]['ejercicio']+'</td>'+
            '<td>'+data2[i]['periodo']+'</td>'+
            '<td>'+data2[i]['Movimientoef'].toUpperCase()+'</td>'+
            '<td>'+data2[i]['Perdidaf']+'</td>'+
            '<td>'+data2[i]['Perdidaa']+'</td>'+
            '<td>'+data2[i]['Resultadof']+'</td>'+
            '<td>'+data2[i]['PTUPP']+'</td>'+
            '<td>'+data2[i]['PTUCC']+'</td>'+
            '<td>'+data2[i]['ISRR']+'</td>'+
            '<td>'+data2[i]['Nod']+'</td>'+
            '<td>'+data2[i]['UFINN']+'</td>'+
            '<td>'+data2[i]['difec']+'</td>'+
            '<td>'+data2[i]['SaldosA']+'</td>'+
            '<td>'+data2[i]['INPCMM']+'</td>'+
            '<td>'+data2[i]['INPCFAA']+'</td>'+
            '<td>'+data2[i]['Fact']+'</td>'+
            '<td>'+data2[i]['SaldoAAc']+'</td>'+
            '<td>'+data2[i]['Divp']+'</td>'+
            '<td>'+data2[i]['SaldoTT']+'</td>'+
            '</tr>');
        }
    });  
    alert("Cuin");
}


        <script onload="salida()" src="<?php echo base_url("/_js/fixed_table_rc.js");?>" type="text/javascript" ></script>
<script onload="salida2()" src="<?php echo base_url("/_js/fixed_table_rc2.js");?>" type="text/javascript" ></script>
<script src="<?php echo base_url("/_js/build.js");?> "></script>
Origen Enlace

crear una pausa antes de abrir ventana modal para que se carguen scripts

Estos scripts agregan formato especifico a una tabla, cuando la pagina es abierta por primera vez todo se muestra correctamente, pero visualizar el modal por segunda vez los archivos se cargan muy rapido y no se aplica sobre la tabla.

" type="text/javascript" >
<script onload="salida2()" src="<?php echo base_url("/_js/fixed_table_rc2.js");?>" type="text/javascript" ></script>
<script src="<?php echo base_url("/_js/build.js");?> "></script>