Advertisement
jamboljack

Post Save Item

Aug 4th, 2016
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <script>
  2. $(function(){
  3.     $("#fItem").submit(function() {          
  4.         dataString = $("#fItem").serialize();
  5.         $.ajax({
  6.             type: "POST",
  7.             url: "<?php echo site_url(); ?>" + "apotek/purchasing/savedataitem",
  8.             dataType: 'json',
  9.             data: {
  10.                 csrf_test_name : csrf_value,
  11.                 no_purchase : no_purchase,
  12.                 code : obat_code,
  13.                 name : obat_name
  14.             },
  15.            
  16.             success: function(data) {
  17.                 alert('Successful!');
  18.             }
  19.         });
  20.         return false;
  21.       });
  22.    });
  23. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement