Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. <script>
  2. $(function(){
  3. $('.edit').click(function(e){
  4. e.preventDefault();
  5. $('#edit').modal('show');
  6. var id = $(this).data('id');
  7. getRow(id);
  8. });
  9.  
  10. $('.delete').click(function(e){
  11. e.preventDefault();
  12. $('#delete').modal('show');
  13. var id = $(this).data('id');
  14. getRow(id);
  15. });
  16. });
  17.  
  18. function getRow(id){
  19. $.ajax({
  20. type: 'POST',
  21. url: 'account_type_row.php',
  22. data: {id:id},
  23. dataType: 'json',
  24. success: function(response){
  25. $('.decid').val(response.seriesno);
  26. $('#edit_account_type_id').val(response.seriesno);
  27. $('#edit_accounttype').val(response.accounttype);
  28. $('#edit_accounttitle').val(response.accounttitle);
  29. $('#edit_accounttype').val(response.accounttype);
  30. $('#approve_account_type_id').val(response.account_type_id);
  31. $('#approve_accounttype').val(response.accounttype);
  32. $('#approve_accounttitle').val(response.accounttitle);
  33. $('#approve_accounttype').val(response.accounttype);
  34. $('#edit_postedby').val(response.postedby);
  35. $('#del_account_type').html(response.account_type);
  36. }
  37. });
  38. }
  39. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement