Newsletter sign-up form with success message without JS

Solution retrospective
I am proud of the end product. I think it is very similar.
What challenges did you encounter, and how did you overcome them?The most challeging thing was form validation. I used the mdn documentation.
What specific areas of your project would you like help with?If you see something that I could improve, please let me know I will appreciate it.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@AnjelToppo
You've done a great job with this!
However, I encountered a small issue when I tried to subscribe to the newsletter – the page seemed to break.
Looking at the main.js file, around line 31, I noticed the line
window.location.href = "/success.html";
. It appears an absolute path is being used here, which might be the reason for the broken page.To potentially fix this, you could try using a relative path by simply removing the leading /, like this:
window.location.href = "success.html";
.Alternatively, if you still prefer to use an absolute path, you might want to try this:
window.location.href = "/Newsletter-Sign-Up-FM/success.html";
.One other minor point I noticed is in the successful subscription message. It seems to display a hardcoded email address, ash@loremcompany.com. It would be great if this could be updated to show the actual email address the user provided during sign-up.
Marked as helpful
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