How to make the form visible after submitting it BUT not directing/actioning it? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How to make the form visible after submitting it BUT not directing/actioning it?

I made a HTML file with form in it, I tried the method "POST", and suddenly it disappears. I tried the method "GET", and suddenly it redirected me to a website(No action attribute) If its possible to make a form that never disappear and never redirects, what do I do? Code: https://code.sololearn.com/WlX41EflnTWQ/?ref=app

31st Aug 2019, 3:39 AM
Name Omitted until I come back
9 Answers
+ 2
Heracles Ezzequiell what if on mobile(Im using it right now)? Also what do you mean by the answer?
31st Aug 2019, 5:54 AM
Name Omitted until I come back
+ 2
I didnt put my method as "POST" because it would disappear Same as "GET" since it also redirects. If there is a method that never disappears or redirects... Heracles Ezzequiell
31st Aug 2019, 6:03 AM
Name Omitted until I come back
+ 2
Im not sending data to anywhere. Im making a encoder/decoder for my "cipher". Not sending data to anyplace :/
31st Aug 2019, 6:15 AM
Name Omitted until I come back
+ 2
Still redirects to me tho(Im in Mobile)
31st Aug 2019, 6:20 AM
Name Omitted until I come back
0
If what you want to do, for example, send an email with the form data where the action is something.php, you can avoid redirection and updating with Ajax.
31st Aug 2019, 5:37 AM
Eze
0
I thought you wanted what I answered because I have seen your code and the form does not disappear ... I think I have not understood your doubt hahaha
31st Aug 2019, 6:01 AM
Eze
0
But the code is what you want or need to send the data to another page or another place like an email?
31st Aug 2019, 6:13 AM
Eze
0
Then you don't need any method. the methods will be used when it is necessary to send that data to another place. It will be the way the data is processed.
31st Aug 2019, 6:18 AM
Eze
0
ohhh 😱 I am with the mobile and it does not redirect me. It works properly until I can see.
31st Aug 2019, 6:22 AM
Eze