Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Newsletter signup and success notification challenge demo

Jose Monge•340
@josemongedev
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


In general I tried to use semantic HTML tags for the basic structure. The first signup page is a section and the notification is an aside element that's hidden initially. I wrote the script code using plain vanilla javascript without any framework. Also, I use preventDefault to stop the submission of the form, so no backend connection is made. The javascript is loaded on the window.onload function and it's separated into 3 sections: elements/document objects, handlers and finally events. I think this generic structure works fine for small implementations like this. Any recommendation is welcome. Thanks!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Jose Monge's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License