I use a (Bootstrap) Modal for signing up to a newsletter. I use jQuery/Ajax to process the form. Now I am looking for a way to have the success and error messages appear in the modal instead of in the underlying page. Can someone point me to a good tutorial or give me some guidance in this.
Thank you in advance
Edit: For handeling the messaging I use http_response_code within PHP
In your success callback, just append/add the success message to the modal. The modal will already be present in the DOM when the callback returns, so you should be able to select it and manipulate it however you desire.
@James_Hibbard. What do you meaan with this? This would normally be the responce:
http_response_code(200);
echo "Great! You successfully subscribed to our newsletter. You can unsubscribe anytime if you not longer wish to receive our e-mail newsletters.";