some submits redirect you to a page that thanks you. but, how to create a directive to remain on the page w/ popup thanks? js? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

some submits redirect you to a page that thanks you. but, how to create a directive to remain on the page w/ popup thanks? js?

Buttons & Forms

22nd Apr 2018, 7:33 PM
Daniela Archibong
Daniela Archibong - avatar
4 Answers
+ 1
Return false on your form from onsubmit event <form onsubmit="return submitted()"> </form> function submitted() { alert("Thanks"); return false; }
22nd Apr 2018, 7:37 PM
Toni Isotalo
Toni Isotalo - avatar
+ 1
The exemple given by Toni Isotalo has to be competed by an Ajax function to send the data to your server. Then, your server sends the email.
22nd Apr 2018, 7:50 PM
jerome
0
i currently have a button that will open up the results on the form in an email application. i am wanting the information to be compiled and perhaps sent automatically.
22nd Apr 2018, 7:41 PM
Daniela Archibong
Daniela Archibong - avatar
0
thanks to you both. i will test this out.
22nd Apr 2018, 7:51 PM
Daniela Archibong
Daniela Archibong - avatar