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

Responsive Page using Flex Box ,SASS and JavaScript

David 50

@DavedCN

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


On desktop mode when the "dismiss" button is pressed, the layout returns to the mobile view. I am unsure why this happens and the way I found to fix it was to use "location.reload()". I would appreciate if anyone could explain why this happens.

Criticism on any part of my code is highly welcome.

Community feedback

@AdditionAddict

Posted

On mobile so can’t run code but I’d have type=“button” on the dismiss button. type=“submit” is usually paired with a form and immediate posting of data to the server causing a refresh. A lot of web frameworks that implement forms do a preventDefault because it isn’t the 90s anymore and php use isn’t so prevalent

0

David 50

@DavedCN

Posted

@AdditionAddict I don't really understand the first part of your statement. I have changed type to submit on the dismiss button.

0

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