Skip to content

Commit

Permalink
Added error message when feedback requested without selecting any movie
Browse files Browse the repository at this point in the history
  • Loading branch information
rishi2019194 committed Oct 15, 2023
1 parent eb209e1 commit c0d9f89
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/recommenderapp/static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ $(document).ready(function () {
2: "Yet to watch",
3: "Like",
};

// to check if any movies selected before giving feedback
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++) {
Expand Down

0 comments on commit c0d9f89

Please sign in to comment.