Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function printParking(parking_url)
- {
- $.ajax({
- url: parking_url,
- type: 'get',
- success:function(response) {
- var mywindow = window.open('', 'PrintWindow', 'height=400,width=600');
- mywindow.document.write(response);
- mywindow.document.close();
- mywindow.focus();
- setTimeout(function(){
- mywindow.print();
- mywindow.close();
- },300);
- }
- })
- }
- </script>
- <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>
- <?php if($this->session->flashdata('success')): ?>
- <div class="alert alert-success alert-dismissible" role="alert">
- <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
- <?php echo $this->session->flashdata('success'); ?>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement