updated name ReviewDetails.html ReviewDetails.js

This commit is contained in:
rheabhutada02 2022-11-17 12:25:18 -08:00
parent 29b065562e
commit cf551f932b
2 changed files with 6 additions and 6 deletions

View File

@ -19,8 +19,8 @@
</head>
<body>
<main>
<button type="button" id="update">Update</button>
<button type="button" id="delete" class="danger">Delete</button>
<button type="button" id="update-btn">Update</button>
<button type="button" id="delete-btn" class="danger">Delete</button>
</main>
<!----> <form id="update-food-entry" class="hidden">
<fieldset>
@ -67,7 +67,7 @@
<div class='tag-container' id="tag-container-form">
</div>
<button type="button" id="tagAdd">Add Tag</button>
<button type="button" id="tag-add-btn">Add Tag</button>
</label>
</fieldset>

View File

@ -10,7 +10,7 @@ function init(){
}
function setupDelete(){
let deleteBtn = document.getElementById("delete");
let deleteBtn = document.getElementById("delete-btn");
let reviews = getReviewsFromStorage();
let current = JSON.parse(sessionStorage.getItem("current"));
deleteBtn.addEventListener("click", function(){
@ -35,7 +35,7 @@ function setupDelete(){
}
function setupUpdate(){
let updateBtn = document.getElementById("update");
let updateBtn = document.getElementById("update-btn");
let reviews = getReviewsFromStorage();
let current = JSON.parse(sessionStorage.getItem("current"));
let form = document.getElementById("update-food-entry");
@ -104,7 +104,7 @@ function setupUpdate(){
});
let tagAddBtn = document.getElementById("tagAdd");
let tagAddBtn = document.getElementById("tag-add-btn");
tagAddBtn.addEventListener("click", ()=> {
let tagField = document.getElementById("tag-form");
if (tagField.value.length > 0) {