Advertisement
Guest User

Help zik

a guest
Aug 22nd, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.04 KB | None | 0 0
  1. Js Nya
  2. <script>
  3. // $(document).ready(function() {
  4. $('#detailWebview').click(function() {
  5. var ID_MENU_INPUT = document.getElementById("idMenuWebview").value;
  6. $.ajax({
  7. url: "getMenuAjax/" + ID_MENU_INPUT,
  8. type: 'GET',
  9. dataType: 'json',
  10. success: function(data) {
  11. console.log('Data', data.webview);
  12. console.log('ID', ID_MENU_INPUT);
  13. $('#IdAction').val(data.webview.action)
  14. $('#idTitle').val(data.webview.title)
  15. },
  16. error: function(data) {
  17. console.log('error');
  18. }
  19. });
  20. });
  21. // });
  22. </script>
  23.  
  24. Button Nya
  25. <button class="btn btn-default full-width" id="detailWebview" data-toggle="modal" data-target="#ModalURL<?php echo $key->id_menu ?>">
  26. Edit Link URL Menu
  27. </button>
  28.  
  29.  
  30. Form Modal nya
  31. <?php foreach ($allmenu as $modal) { ?>
  32. <div class="modal fade" id="ModalURL<?php echo $modal->id_menu ?>">
  33. <div class="modal-dialog">
  34. <div class="modal-content">
  35.  
  36. <!-- Modal Header -->
  37. <div class="modal-header">
  38. <h4 class="modal-title">Modal Edit URL / Link Menu</h4>
  39. <button type="button" class="close" data-dismiss="modal">&times;</button>
  40. </div>
  41.  
  42. <!-- Modal body -->
  43. <div class="modal-body">
  44. <form enctype="multipart/form-data" action="<?php echo base_url('admin/updateURLMenu/') ?><?php echo $modal->id_menu ?>" method="post">
  45. <div class="form-group">
  46. <label for="">Nama URL Menu</label>
  47. <input type="text" id="IdAction" class="form-control" name="action" placeholder="Masukan URL / Link Menu">
  48. <input type="hidden" class="form-control" id="idMenuWebview" name="id_menu" value="<?php echo $modal->id_menu ?>">
  49. </div>
  50. <div class="form-group">
  51. <label for="">Title Webview</label>
  52. <input type="text" id="idTitle" class="form-control" name="title" placeholder="Masukan Title">
  53. </div>
  54. <button type="submit" class="btn btn-gradient-primary mr-2">Posting</button>
  55. <button class="btn btn-light" type="reset">Batal</button>
  56. </form>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement