simple usability – ask for confirmation
I often get confused if an accidental click on some link removes some data I need on a particular resource. I do not understand why the site webmaster is not able to add just one line that might allow to avoid many bad situations when some data is lost irretrievably.
There are many ways to ask for confirmation: it can be done either on server side, or on the client side. It’s almost a 5-seconds task with just one javascript sentence:
<a href="delete_something.php" onclick="javascript: if (!window.confirm('Are you sure')) return false;">Delete</a>
Of course, the server-side validation is not so quick and easy (yet it’s not a complex task), but it is more reliable. Ask users for confirmation if their action is going to remove some object or data. That’s essential I believe.
August 28th, 2009 at 7:37 pm
Well, in my opinion there is a small mistake.
instead of:
if (!window.confirm(’Are you sure’) return false;)
there should be:
if (!window.confirm(’Are you sure’)) return false;
August 28th, 2009 at 9:42 pm
Yes, sure. Thank you for the notice!