JQuery validation and AJAX call parsererror

JQuery validation and AJAX call parsererror

Hi All,

I am using the JQuery 1.5 and JQuery validation 1.7 and found a very strange problem:

If I load the jquery.validate before ajax call as:

<script src="../javascript/jquery-1.5.min.js" type="text/javascript"></script>  
<script src="../javascript/jquery.validate.js" type="text/javascript"></script>    
 <script type="text/javascript">
        $.ajax({
            url: "../webservices/Test.asmx/Test",
            dataType: "json",
            type: "POST",
            contentType: "application/json; charset=utf-8",
            data: "{}",
            success: function(data) {
                var result = data.d;
                alert(result);
            },
            error: function(xhr, ajaxOption, thrownError) {
                var errMsg = window["eval"]("(" + xhr.responseText + ")");
                alert(errMsg.Message);
            }
        });
    </script>

I will get the parsererror. But If I move validation after the ajax, it is OK.

Please give me some suggestion.

Thanks.