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
9 Answers
+ 2
Heracles Ezzequiell what if on mobile(Im using it right now)?
Also what do you mean by the answer?
+ 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
+ 2
Im not sending data to anywhere.
Im making a encoder/decoder for my "cipher".
Not sending data to anyplace :/
+ 2
Still redirects to me tho(Im in Mobile)
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.
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
0
But the code is what you want or need to send the data to another page or another place like an email?
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.
0
ohhh 😱
I am with the mobile and it does not redirect me. It works properly until I can see.