Design comparison
SolutionDesign
Solution retrospective
- When submit with an empty textbox, the error icon and "no valid message" still occur, but I can't stop the page from refreshing after that.
2.The area that contained all the text, when it is more than 1440px width, somehow the textbox is having a fixed height compare to the profile picture, despite I insert 100% height on that area that contained all the text ( the profile picture I inserted 100% height)
Community feedback
- @DonUggioniPosted over 2 years ago
Hi there,
Regarding the page reload after clicking on the submit button, that's a default behavior. To avoid that, instead of writing this line '
onclick="ValidateEmail(document.email.email)"
' in the input, you can create a submit function. For example:e.preventDefault(); //rest of the code here };``` The preventDefault method will prevent the page from reloading in case the input is not correct. Hope it helps!
Marked as helpful0
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