mirror of
				https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
				synced 2025-10-31 03:46:50 +00:00 
			
		
		
		
	tempIfElseAlert
This commit is contained in:
		| @@ -31,18 +31,22 @@ function initFormHandler() { | ||||
| 				reviewObject[`${key}`] = `${value}`; | ||||
| 			} | ||||
| 		} | ||||
| 		reviewObject["tags"] = []; | ||||
| 		if(reviewObject["rating"] != null){ | ||||
| 			reviewObject["tags"] = []; | ||||
|  | ||||
| 		let tags = document.querySelectorAll(".tag"); | ||||
| 		for(let i = 0; i < tags.length; i ++) { | ||||
| 			reviewObject["tags"].push(tags[i].innerHTML); | ||||
| 			tagContainer.removeChild(tags[i]); | ||||
| 			let tags = document.querySelectorAll(".tag"); | ||||
| 			for(let i = 0; i < tags.length; i ++) { | ||||
| 				reviewObject["tags"].push(tags[i].innerHTML); | ||||
| 				tagContainer.removeChild(tags[i]); | ||||
| 			} | ||||
|  | ||||
| 			let nextReviewId = newReviewToStorage(reviewObject); | ||||
| 			sessionStorage.setItem("currID", JSON.stringify(nextReviewId)); | ||||
|  | ||||
| 			window.location.assign("./ReviewDetails.html"); | ||||
| 		} else{ | ||||
| 			window.alert("NO"); | ||||
| 		} | ||||
|  | ||||
| 		let nextReviewId = newReviewToStorage(reviewObject); | ||||
| 		sessionStorage.setItem("currID", JSON.stringify(nextReviewId)); | ||||
|  | ||||
| 		window.location.assign("./ReviewDetails.html"); | ||||
|          | ||||
| 	}); | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user