Over a million developers have joined DZone.

A Flex Alternative to 'Are You Sure' Dialogs

DZone's Guide to

A Flex Alternative to 'Are You Sure' Dialogs

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

One of my pet hates in interaction design is the use of confirmation dialogs before the user attempts to do anything of worth. More often than not, with a bit of thought most user actions could be recoverable and rather than stopping the proceedings with idiocy the user could simply press 'undo' and return to their previous state.

One of my favourite articles bemoaning the use of modal dialogs is this one by Jeff Atwood.

However, sometimes a user's action isn't undoable. For instance, detonating an explosive charge ain't easy to undo. In scenarios like this, modal confirmation dialogs still aren't a real solution. Users don't read the text in dialog boxes and simply pressing 'ok' becomes habitual.

What's needed in these situations is a button that requires a definite and decisive user action and maybe my PressAndHoldButton does the trick. This requires the user to keep the button held down for some period of time before firing an event. 

The demo has three buttons - before any of those actions are performed, the user has to keep the relevant button depressed for five seconds.

The demo application is available here and the source code here.

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.


Published at DZone with permission of Simon Gladman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}