diff --git a/public/index.html b/public/index.html
index a4e0fac..4daba21 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,6 +7,8 @@
+ Please enter a task!
diff --git a/public/script.js b/public/script.js
index 9c6912e..ae4e7c0 100644
--- a/public/script.js
+++ b/public/script.js
@@ -9,4 +9,14 @@ document.addEventListener('DOMContentLoaded', () => {
console.log("App Initialized");
// Load tasks will be called here later (Issue #9)
});
-
+ addBtn.addEventListener('click', () =>
+ {
+ const text = taskInput.value.trim();
+ const errorMsg = document.getElementNyId('error-msg');
+ if (text === ") {
+ errorMsg.style.display = 'block';
+ return;
+ }
+ errorMsg.style.display = 'none';addTask(text);
+ taskInput.value = ";
+ });