Design comparison
Solution retrospective
The most difficult part was the JS for sure.
The big question I have is how to keep the JS alerts from just popping on and off so quickly. Is this just because of the "#" in the action of the form? Any info would be great. Is there a test place to send stuff to make it so it won't behave this way?
Community feedback
- @GuyTitoPosted over 2 years ago
You did very well on this challenge.
To keep the JS alerts from just popping on and off so quickly, prevent default action when form is submitted. You do this by adding event.preventDefault() to the onsubmit attribute of the form tag.
Like this:
<form name="myForm" action="#" onsubmit="event.preventDefault()">Marked as helpful0@mooryxPosted over 2 years ago@GuyTito i had same problem and find out if i change submit to button it wont refresh the page
0
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