Using window.location and return confirm together
<p>I have this button that will send a user to a page but first ask the user to confirm, but it's not working correctly, how can I fix it? Thanks</p>

<p><code>&lt;input class="cancel" type="button" value="Cancel" onclick="window.location.href='&lt;?php bloginfo('home'); ?&gt;';return confirm('Are you sure you want to delete your post?');" /&gt;</code></p>
