Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it frowned upon to use js alerts with user

My user is filling out a small form (just the email address) and I send this data to the server via javascript. I send the form, then clear the data from the fields.

Is it bad practice to simply give the user a js alert like alert('Your email has been added') as opposed to adding markup to display the message? I don't see it often today, so I'm wondering if it reflects some perception that using alerts isn't good. It makes the code much easier though, and I wonder why not!

And a side question, is it possible to just style this alert so it doesn't look so bad?

like image 634
zmol Avatar asked Feb 07 '11 10:02

zmol


2 Answers

alert interrupts the user in whatever he was doing. That's not good and should only be done if it is absolutely necessary. An alert is not necessary, because the user has only one way to continue anyway.

like image 115
Oswald Avatar answered Sep 29 '22 16:09

Oswald


It's not a very pleasant user experience when popup alerts keep appearing. Annoying as they interrupt what you are doing and you have to click on a button to carry on what you are doing. Excessive use makes it very unlikely that they will ever be read, causing big problems when something actually important comes up or the user has to make a choice.

Having more sophisticated feedback in the interface creates a much better experience.

like image 34
OrangeDog Avatar answered Sep 29 '22 17:09

OrangeDog