Getting buttons to reset and dialogs to continue on to regular action

Getting buttons to reset and dialogs to continue on to regular action

I have 2 questions:

1. I'm using the button widget to launch a dialog.  if i cancel out of the dialog the button stays in its hovered state.  i've tried putting the .button("refresh") just about everywhere and nothing seems to reset the button state.

2. i am using the dialog to offer a warning before clearing some options from a database (via submitting a form).  i have the button widget on a <button type="submit"> within a form, so sans jquery that submits the form. cancel  closes the dialog as expected, but i'd like a confirmation response to continue on to the regular action.  is that possible?