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

Note card with conditional check IF

Tiago Ribeiroβ€’ 80

@TiagoRidev

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 guys.

This project was made with html, css and javascript using a check conditional, just it's posible tap submit button if to select a note.

Could you give me some feedback?

Community feedback

P
visualdennisβ€’ 8,375

@visualdenniss

Posted

Great submission! Your JS seems to be working well, and the form is well centered as well as responsive.

I'd suggest avoid using alert('Please, select a note.'), as there as many issues with that. One of them being: "alert(...) as well as confirm(...) and prompt(...) can be useful for debugging during development, but in production mode this kind of pop-up could expose sensitive information to attackers, and should never be displayed." (source: https://rules.sonarsource.com/javascript/RSPEC-1442 )

alert() also block the code execution and it is not something u might want. Instead try to disable the button until something is selected, or simply add an error message and display that below/above the button.

Hope you find this feedback helpful!

Marked as helpful

0

Tiago Ribeiroβ€’ 80

@TiagoRidev

Posted

@visualdenniss thank you very much for the feedback. I didn't know about alert and prompt, your information was very important for me.

Thanks.

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