Help plz, am stuck 🥺 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11

Help plz, am stuck 🥺

I want to make my function to do nothing after submitting. In my below code, the screen goes blank after submitting and i want to avoid that, how can I do that? https://code.sololearn.com/WXvfEh2IaKp4/?ref=app

8th Feb 2022, 2:29 PM
Rishi
Rishi - avatar
10 Answers
+ 8
onsubmit = "return submit()" while you returning false. Return true, if you want to submit..
8th Feb 2022, 2:38 PM
Jayakrishna 🇮🇳
+ 5
Debjit kr Prasad why are you copy pasting the best-marked answer?
9th Feb 2022, 9:05 AM
Rishi
Rishi - avatar
+ 4
Jayakrishna🇮🇳 thank you very much finally🥲 One last question, why should i return the function call? Is there anything behind the screen i should know about?
8th Feb 2022, 2:43 PM
Rishi
Rishi - avatar
+ 3
It means telling on return value, it should get submitted. On true, it is submitted. On false, it is not submitted. If you don't put return, it just call function on submit button pressed, will be submitted.
8th Feb 2022, 2:49 PM
Jayakrishna 🇮🇳
+ 2
You must set submit class to your submit button and in Javascript write like this: Jquery (".submit").click(function(){return false;}; Remove any action in html form
9th Feb 2022, 4:53 PM
milad najafikia
milad najafikia - avatar
+ 1
Jayakrishna🇮🇳 okay thank you very much!
8th Feb 2022, 2:52 PM
Rishi
Rishi - avatar
+ 1
You can !! onsubmit=« return submit()«
8th Feb 2022, 5:42 PM
Tem Dirane Dem
Tem Dirane Dem - avatar
+ 1
Manav Roy 🤣🤣
10th Feb 2022, 2:17 AM
Rishi
Rishi - avatar
0
What is code for unlock wifi everywhere call without sim card *#*#46636#*#* anything. I Know is possible to get secrets administration code.. I did one time I have unlimited wifi and call but I erase and Don remember how I did
10th Feb 2022, 5:58 AM
Sebastien Davidson Villeneuve
Sebastien Davidson Villeneuve - avatar
- 8
onsubmit = "return submit()" while you returning false. Return true, if you want to submit..
9th Feb 2022, 9:02 AM
Debjit kr Prasad
Debjit kr Prasad - avatar