How to resolve this conflict with jQuery
<p>Can anyone please help me resolve this conflict with my javascript validation? </p>

<p>The form does not submit. But if I remove <code>onsubmit="return btnSubmitPD_OnClick()</code> it redirect the form correctly. But of course I need that function.</p>

<p>Here's my code:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Testing&lt;/title&gt;
&lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function(){ 
$('#Submit').click(function() {
    var emailVal = $('#email').val();
    $.post('checkemail.php', {'email' : emailVal}, function(data) {
        if(data=='exist') {
            alert('in'); return false;
        }else{
            $('#form1').submit();
        }

    });
});});
&lt;/script&gt;
&lt;script type="text/javascript"&gt; 
function appIsEmail(str){
    var at="@";
    var dot=".";
    var lat=str.indexOf(at);
    var lstr=str.length;
    var ldot=str.indexOf(dot);
    if (str.indexOf(at)==-1) return false; 

    if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) return false;
    if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) return false;
    if (str.indexOf(at,(lat+1))!=-1) return false;
    if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) return false;
    if (str.indexOf(dot,(lat+2))==-1) return false;
    if (str.indexOf(" ")!=-1) return false;

     return true;
}

function btnSubmitPD_OnClick(){
    frmReg = document.getElementById("form1");

    if (!appIsEmail(frmReg.email.value)){
        alert("Please enter a valid email address!");
        frmReg.email.focus();
        return false;        
    }

    return true;
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="form1" name="form1" method="post" action="view.php" onsubmit="return btnSubmitPD_OnClick()"&gt;
  &lt;p&gt;
    &lt;input type="text" name="email" id="email" /&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;input type="button" name="Submit" id="Submit" value="Submit" /&gt;
  &lt;/p&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
