CloudAnts commited on
Commit
3c6631e
·
1 Parent(s): a86b1aa
Files changed (1) hide show
  1. templates/index3.html +6 -0
templates/index3.html CHANGED
@@ -81,6 +81,12 @@
81
  const downloadCsvButton = document.getElementById('download-csv');
82
  const downloadImageButton = document.getElementById('download-image');
83
 
 
 
 
 
 
 
84
  uploadBtn.addEventListener('click', () => {
85
  const file = invoiceInput.files[0];
86
  if (!file) return alert('Please select a file.');
 
81
  const downloadCsvButton = document.getElementById('download-csv');
82
  const downloadImageButton = document.getElementById('download-image');
83
 
84
+ // Listen for file selection and trigger page refresh
85
+ invoiceInput.addEventListener('change', () => {
86
+ // Reload the page when a file is selected
87
+ window.location.reload();
88
+ });
89
+
90
  uploadBtn.addEventListener('click', () => {
91
  const file = invoiceInput.files[0];
92
  if (!file) return alert('Please select a file.');