Easy there, pal!
To access the Scrolling and operators challenges in the JavaScript basics, you need to sign up and subscribe first.
Muffin has decided to find out what visitors think about the FlashNews news portal. He created a survey page to gather their feedback. To save users time, Muffin wants them to choose one of the ratings by selecting a radio button.
The group of radio buttons allows the user to select one option out of several proposed ones. Only one radio button can be active in a single group. If you select another radio button, then the previous one will be automatically unselected.
To rate the news portal, users must select the radio button for the rating that they would like to leave and then submit the form.
The results of the survey showed that not all users are delighted with the site. Muffin was upset… And then he decided that he needed to urgently refine the survey page!
The plan is as follows: if the user selects a good rating, then everything can work as it should. But if the user tries to leave a bad rating, then the submit button should be disabled, and the user should be told that an error occurred.
Muffin has assigned you the task of writing the script. Here are some things to keep in mind:
review class.onchange event handler to each radio button.data-evaluation attribute. If the review is good, then the value of this attribute is 'good', and if the review is bad, then it is 'bad'.submit-button class. If the user tries to leave bad feedback, the button must be disabled. If they choose good feedback, it should be enabled.shown class to the element with the error class. This message should be displayed if the user tries to leave a bad rating. If the user decides to leave good feedback, then the error message should be hidden.You’ve gone to a different page
Click inside the mini-browser to shift the focus onto this window.
To access the Scrolling and operators challenges in the JavaScript basics, you need to sign up and subscribe first.
Have you forgotten your password or lost access to your profile? Enter your email connected to your profile and we will send you a link to restore access.
Forgot to connect your email to the profile? Email us and we’ll help.