Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop-Up Message for Successful Message Send #7

Open
mahendra785 opened this issue Aug 20, 2024 · 1 comment
Open

Pop-Up Message for Successful Message Send #7

mahendra785 opened this issue Aug 20, 2024 · 1 comment

Comments

@mahendra785
Copy link
Collaborator

Implement a pop-up message or toast notification that appears when a user successfully sends a message through the contact form. This message should confirm that the message was sent.

@mahendra785
Copy link
Collaborator Author

Pop-Up Message for Successful Message Send

Pseudocode

1. Contact Form Structure

  • ContactForm Component
    • form.contact-form
      • input - User input fields (e.g., name, email, message)
      • button.submit - Submit button
    • Handle form submission with JavaScript.

2. Pop-Up Message/Toast Notification Component

  • PopUpMessage Component
    • div.pop-up-message
      • Success message text (e.g., "Your message has been sent successfully!")
      • Style to appear as a toast notification.
    • Initially hidden, becomes visible upon successful form submission.

3. JavaScript Logic for Handling Form Submission

  • Handle Form Submission

    • On form submit:
      • Prevent default form action.
      • Validate form data.
      • Send form data to the server (e.g., via AJAX or fetch API).
      • On success, trigger the pop-up message.
  • Show and Hide Pop-Up Message

    • Show the pop-up message on success.
    • Automatically hide the message after a few seconds or allow user dismissal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant