Hi,
Like you can have some hidden text fields which can set or reset onclick of the these two buttons.
If button1 is pressed write a script to set the text field value 1.
if button2 is pressed then reset the text field value to 0.
To get confirmation message box ,you can use the below statement.
xfa.host.messageBox(" still you want to continue ?","Alert","3","2");
Regards,
ManjuVardhan