+ 1

What is the problem with this code? Output is not stable.

https://code.sololearn.com/WrmCGN7IscK1/?ref=app

2nd Jul 2021, 7:14 PM
MD. Jashim Uddin
MD. Jashim Uddin - avatar
4 Respuestas
0
Morning ! , I have edited your code such that the output doesn't disappear. By output , I assumed you meant the whole page doesn't go crazy. I have removed the method = "post" since you don't have any endpoint to post to. I have removed the inline onClick and added an event listener on window load such that when clicked I get the click event as "e" which has a function "e.preventDefault();" to prevent the page from reloading . Hope I have helped you. If you still have any queries , you can ask freely. Code : https://code.sololearn.com/WA166A139a8A Here's a cookie 🍪 , Have a good day
3rd Jul 2021, 5:37 AM
Saphal Poudyal
Saphal Poudyal - avatar
+ 1
Ćheyat after submitting the form, the output is disappeared
2nd Jul 2021, 8:16 PM
MD. Jashim Uddin
MD. Jashim Uddin - avatar
+ 1
Thank You Ćheyat. Problem resolved! I have edited again so that the output is shown in Output box.
3rd Jul 2021, 8:53 AM
MD. Jashim Uddin
MD. Jashim Uddin - avatar
0
By not stable , you mean? 🤔🤔
2nd Jul 2021, 8:14 PM
Saphal Poudyal
Saphal Poudyal - avatar