From 271fb86b355abdb7fe510dbdf56a018b8330c0ec Mon Sep 17 00:00:00 2001 From: rishi2019194 <58341663+rishi2019194@users.noreply.github.com> Date: Sun, 15 Oct 2023 18:21:05 -0400 Subject: [PATCH] Added error message when feedback requested without selecting any movie --- src/recommenderapp/static/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/recommenderapp/static/script.js b/src/recommenderapp/static/script.js index c20e5c9d4..e0d3cbb2f 100644 --- a/src/recommenderapp/static/script.js +++ b/src/recommenderapp/static/script.js @@ -116,6 +116,11 @@ $(document).ready(function () { 2: "Yet to watch", 3: "Like", }; + + if(myForm.length == 0){ + alert("No movies found. Please add movies to provide feedback."); + return; + } var error = false; // Flag to track errors for (var i = 0; i < myForm.length; i++) {