Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Interactive Rating component main - HTML/CSS/JS

keziarkts 370

@keziarkts

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi 👋 My problem in this challenge is that when it comes to clicking "submit", the user has to click 2 times (instead of 1) to submit the review and for the "thank you" page to pop up.

So if someone can tell me where I went wrong or how to improve this specific part, I would be very grateful!

edit: problem resolved thanks to @anxhelino :)

Community feedback

anxhelino 200

@anxhelino

Posted

Hello, the solution to your problem would be to get rid of the if else statement on your showThanks function. Just leave it like this : function showThanks() { var divShowThanks = document.getElementById("thanks-state"); var divHideRating = document.getElementById("rating-state");

divHideRating.style.display = "none"; divShowThanks.style.display = "block"; getRating(val); }

Marked as helpful

1

keziarkts 370

@keziarkts

Posted

Hi @anxhelino, your solution works really well! Thanks a lot 😊

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord