[BUG] [SUGGESTION] Stop using alert() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 69

[BUG] [SUGGESTION] Stop using alert()

Code Playground bug: I can't go back from a running web code if alert, prompt or confirm popup is on. I have to restart the app to quit the running code. Suggestion for users: Stop making codes with more than 2 consecutive alert, prompt or confirm functions. Suggestion for SL: Please, make the "back" button clickable at any time. It would help to avoid these dialogs. If somebody suffers from this like I do, please describe your feelings below. Here are some BAD code examples: https://code.sololearn.com/WJHxe3e3Jklt/#html https://code.sololearn.com/WTz1l0Ax4PPw/#html

1st Apr 2018, 9:05 AM
Igor Makarsky
Igor Makarsky - avatar
9 Answers
+ 31
I won't judge the codes you posted because i'm lazy to check them out and because i do not want discourage the authors of those codes, but there are pros and cons. The "alert()" kills the user experience, codes w/h many alerts are boring regardless the quality of the code, there are thousands of less intrusive ways to let the user see your message. On the other side, the "alert()" is the easiest way for beginners to communicate w/h us, they are just starting w/h programming, they don't know almost nothing about UX, accessibility and all of this stuff. So, my advice is: If you are not a beginner, please avoid too many "alert()" in your code, otherwise do not be afraid to use them if needed, we appreciate you as a SoloLearner.
1st Apr 2018, 9:42 AM
Maz
Maz - avatar
+ 21
CipherFox fixed. Don't worry.
23rd Apr 2018, 8:05 AM
Igor Makarsky
Igor Makarsky - avatar
+ 14
It is extremely annoying if a code has infinite alerts😞
1st Apr 2018, 1:14 PM
Muhd Khairul Amirin
Muhd Khairul Amirin - avatar
+ 10
If you time the click on the back button right, you can exit back to the code section, where the alerts will stop. But it is definitely annoying. :)
1st Apr 2018, 9:24 AM
LunarCoffee
LunarCoffee - avatar
+ 10
a suggestion: use console.log() instead of alert() console.log placed on bottom of output and you can hiding it by scrolling it to bottom(if you are on SL's app) and it isn't annoying if you are on SL's website if you want make a quiz, like @Jax's Javascript quiz, use input and button. it will be better
2nd Apr 2018, 7:42 AM
Amethyst Animion
Amethyst Animion - avatar
+ 9
I had also encountered the alert loop.. the alert itself become a challenge to breakout and if couldn't, then the harsh way is to just quit the app process.. Due to such instances, i get lazy to view the web codes.. unless the code is well documented..
1st Apr 2018, 9:59 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 3
I wouldn't blame those coders.they are beginners and the "alert()" function is their easiest way to interact with the user.The problem/fault is with sololearn prioritising the alert such that when it's on display,nothing else functions.When an alert,prompt or confirm is on display the back button should still function. my thoughts
2nd Apr 2018, 1:25 PM
᠌᠌Brains[Abidemi]
᠌᠌Brains[Abidemi] - avatar
+ 3
I do dislike the alert, I cannot exit whenever I want to, and when I am testing and something goes wrong with alert, I cannot save my work since I cannot exit to do so. If there was a way to keep the alert consecutive, but another way to be able to exit even with the alerts still active.
4th Apr 2018, 10:00 PM
Norberttony
Norberttony - avatar
0
und
2nd Apr 2018, 8:49 PM
Faduma Hasan
Faduma Hasan - avatar