Advertisement
martinms

evaluasi-rkpd.js

May 19th, 2024
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. $('#opd').select2();
  2.  
  3. setTimeout(() => {
  4.     $('#detail-modal').modal('show');
  5. }, 10);
  6.  
  7. const searchForm = document.querySelector('#searchForm');
  8. const submitBtn = document.querySelector('#submit-btn');
  9. searchForm.addEventListener('submit', (e) => {
  10.     e.preventDefault();
  11.  
  12.     submitBtn.innerHTML = '<i class="fas fa-spinner fa-spin"></i> Memuat...';
  13.     const opd = $('#opd').val();
  14.  
  15.     setTimeout(() => {
  16.         window.location = `${base_url}admin_evaluasi/rkpd/evaluasi/${opd}`;
  17.     }, 1000);
  18. });
  19.  
  20. // get ID FROM URL
  21. const url = window.location.href;
  22. const urlSplit = url.split('/');
  23. const id = urlSplit[urlSplit.length - 1];
  24.  
  25. let btnDownload = document.querySelector('#btn-download-laporan');
  26. btnDownload.href = `${base_url}admin_evaluasi/rkpd/download/${id}`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement