SHARE
TWEET

Untitled

a guest Jun 16th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type="text/javascript">
  2.     function printParking(parking_url)
  3.     {  
  4.       $.ajax({
  5.         url: parking_url,
  6.         type: 'get',
  7.         success:function(response) {
  8.           var mywindow = window.open('', 'PrintWindow', 'height=400,width=600');
  9.           mywindow.document.write(response);
  10.           mywindow.document.close();
  11.           mywindow.focus();
  12.         setTimeout(function(){
  13.              mywindow.print();
  14.             mywindow.close();
  15.         },300);
  16.  
  17.  
  18.         }
  19.       })
  20.     }
  21. </script>
  22.      
  23. <a onclick="printParking('<?php echo base_url('parking/printInvoice/'.$v['parking']['id']); ?>')" class="btn btn-default"><i class="fa fa-print"></i> Imprimir Ticket</a>
  24.      
  25. <?php if($this->session->flashdata('success')): ?>
  26.             <div class="alert alert-success alert-dismissible" role="alert">
  27.               <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  28.               <?php echo $this->session->flashdata('success'); ?>
  29.             </div>
  30. <?php endif; ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top