Design comparison
Solution retrospective
I am quite new to the use of Javascript. I struggled with the use of Event handlers. I found it hard to make the submit button function the way it should. Even now that I have done it, I still think there is another way/ approach to it.
What is the best approach to doing something like this ? What should I have done differently?
Community feedback
- @varuno3Posted over 1 year ago
I see you've missed a text portion in the second(thankyou) page, which says "you selected x out of 5". You can achieve that by creating a variable that can save your rating value, create a container that will contain the required text and give it a class for eg. result, then display it at the place you want by doing the following in JS:
document.querySelector(
.result
).innerHTML =You selected ${variableName} out of 5
;PS: I've put the grave accent ( ` ) across the text which is being highlighted here, you need to put those grave accent marks in you JS as well.
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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