Quantcast
Viewing latest article 3
Browse Latest Browse All 5

Answer by Kaleb Brasee for 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="?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.


Viewing latest article 3
Browse Latest Browse All 5

Trending Articles