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

Tip Calculator App using vanilla JS

@JacobMarshall0

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Are there any issues with my JS? How do I stop the reset button from firing when pressing enter in any of the form inputs?

Community feedback

Suleman 750

@legion40216

Posted

Good work on the project, There two easy fix regarding your problem

  1. Remove the form tags The form tags have a auto refresh button when the key is pressed, So By removing the form tags this issue can be resolved. There is no need for the form tags regarding this app anyways because the data is not sent anywhere else its safe to remove it aswell

  2. JS method through e.preventDefault() You have to write script by querySelecting the form element and placing onSubmit event handler and writing this function in it e.preventDefault()

btw your code is clean and well written keep it up

Marked as helpful

1

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