javascript confirm dialog not working properly
<p>i've been trying to get a confirm box to work, i am using php and jquery to make a confirm box appear when clicking on a delete link, actual code :</p>

<pre><code>$(document).ready(function(){
    if (jQuery("a.delete-link").length &gt; 0) {
        $("a.delete-link").bind("click", function(){
            return confirm("Sunteti sigur ca doriti sa stergeti?");
        });
    }
});
</code></pre>

<p>and the link is called :</p>

<pre><code>&lt;a href="javascript:void(0);" class="formSubmit delete-link" id="sterge"&gt;sterge&lt;/a&gt;
</code></pre>

<p>the link is used to submit a form when clicked, the code for that is :</p>

<pre><code>$(document).ready(function(){
    if ($(".formSubmit").length &gt; 0) {
        if ($(".formSubmit").parents("form").find("input:submit").length == 0) {
            $(".formSubmit").parents("form").append('&lt;div style="width:1px;height:1px;overflow:hidden;"&gt;&lt;input style="width:0;height:0;overflow:hidden;" type="submit" /&gt;&lt;/div&gt;');
        }
        $(".formSubmit").click(function(){
            $(this).parents("form").trigger("submit");
            return false;
        });
    }
});
</code></pre>

<p>i do get the confirm dialog, but any option i chose, the form submits and the delete action is called.. any idea what i'm doing wrong ?</p>
