Why JavaScript dialogs (alert/prompt/confirm) are not widely used and not under active development?
Posted
by serg555
on Stack Overflow
See other posts from Stack Overflow
or by serg555
Published on 2010-04-05T06:03:35Z
Indexed on
2010/04/05
6:13 UTC
Read the original article
Hit count: 295
JavaScript
|dialog
If there is a need to display some simple confirmation popup, most developers would rather install jQuery, find some dialog plugin for it, skin it, than put a one liner:
if(confirm("Are you sure?")) { ... }
Using alert()
for displaying error messages is considered cheap.
And how many sites can you name that are usingprompt()
?
So, the question is:
Is there something wrong with those dialogs so they should be avoided? Yes they have (very) limited functionality and customization, but when you don't need anything fancy, is using js dialogs still a bad practice?
Why these dialogs haven't seen any improvement in past 10 years (probably longer) and none is planned for near future? Wouldn't it be nice to have native js access to fully customizable desktop-level dialogs? At least adding error/warning/info type of dialogs and adding ability to customize button captions would be a big help.
© Stack Overflow or respective owner