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

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

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.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


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

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


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

{{ parent.tldr }}

{{ parent.urlSource.name }}