Forum Moderators: open

Message Too Old, No Replies

How to set newsletter message when a form is submitted?

         

toplisek

12:20 pm on Oct 25, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I try to set a message like an example: Thank you! Your submission has been received!
when an email is submitted. How to manage action using JavaScript/AJAX in this case and replace a form with a message.

So, it is neither a POP-UP or message DIV. It replaces the whole content as it is an action.

NickMNS

12:28 pm on Oct 25, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You need to listen for the on submit event. You then take the form's parent div and removeChild("#form"). This removes the form from the screen. Then you take the same parent div and appendChild with a div that contains your message.

toplisek

2:09 pm on Nov 8, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thank you for the message. Is there also Bootstrap management in this case using a shortcut?