Simple confirmation popup dialog box How is it possible to create simple confirmation popup dialog boxes in Drupal 7?

I've searched a lot, but I found tons of non-working suggestions and code.
I got it!!!

Here's a simple 100% functioning exmple:  

$form['delete'] = array(
    '#type' => 'submit',
    '#value' => t('Delete'),
    '#attributes' => array('onclick' => 'if(!confirm("Really Delete?")){return false;}'),
);


I hope this helps.

Happy coding :)