From 31e58cb2d30b4c4c7ef382c650fc07c2b5cbab20 Mon Sep 17 00:00:00 2001 From: Pat Patterson Date: Wed, 1 Nov 2023 14:22:01 -0700 Subject: [PATCH] Hide the status message when the selected file changes (#381) --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index 5186ac8..d90afb6 100644 --- a/src/index.js +++ b/src/index.js @@ -25,6 +25,12 @@ document.addEventListener("DOMContentLoaded", () => { const uploadFileInput = document.getElementById("uploadFileInput"); const uploadFileButton = document.getElementById("uploadFileButton"); + // When selected file changes, hide the status message + uploadFileInput.addEventListener("change", async () => { + const ref = document.getElementById('result-message-container'); + ref.removeAttribute('class'); + }); + // When upload button clicked, get upload details and then perform file // upload with AJAX. uploadFileButton.addEventListener("click", async () => {