My Return false is not working in this code..using jquery
<pre><code>$(function () {
    $('#form4').submit(function () {
        var val = $("#txtNewServiceTypeCategory").val();

        $("#ServiceTypeCategoryName").children("option").each(function () {
            var $this = $(this);
            if (val == $this.val()) {
                alert("ServiceTypeCategory Name is already added! Please Choose Differnt Category Name");
                return false;
            }
        });
        $('#someHiddenDiv2').show();
        $('#STSave').attr('disabled', 'disabled');
        $.ajax({
            url: this.action,
            type: this.method,
            data: $(this).serialize(),
            success: function (result) {
                $('#someHiddenDiv2').hide();
                alert('Saved NewServiceTypeCategory Successfully. Thank you!');
            },
            error: function () {
                alert('Error occured!  Plese try again later!.');
                $('#someHiddenDiv2').hide();
                $('#STSave').removeAttr('disabled');
            }
        });
        return false;
    });
});
</code></pre>

<p>This return false is not working in the above code even if its showing the popup message other things are executing here,</p>

<pre><code>$("#ServiceTypeCategoryName").children("option").each(function () {
    var $this = $(this);
    if (val == $this.val()) {
        alert("ServiceTypeCategory Name is already added! Please Choose Differnt Category Name");
        return false;
    }
});
</code></pre>

<p>What I am doign wrong in this?</p>

<p>Thanks</p>
