JavaScript alert box with confirm on button press

You can easily do it with a confirm onclick:

<p id="accept-favor"><a title="Accept this Favor" 
  href="https://stackoverflow.com/questions/4952459/?wp_accept_favor=<?php comment_ID(); ?>" 
  onclick="return confirm('Are you sure you would like to accept this reply as your favor?');"
  >Accept this Favor</a></p>

Though this will say OK/Cancel instead of Yes/No. If you really want Yes/No, you’ll have to use a custom dialog.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)