Login Form with ajax
<p>I need to update website login form with ajax. When visitor fails to login, message should appear without refreshing the page and when visitor can login he needs to be redirected to default.asp.</p>

<p>I tried doing this with the following code but no success. I did not receive any errors.
Also, I am not sure if this is secure.</p>

<p>Thank you</p>

<pre><code>    &lt;script type="text/javascript"&gt;   
$(function() {
    var EmailAddress = $("name=EmailAddress").val();
    var Password = $("name=Password").val();

    $.ajax({
        type: "POST",
        url: "signin.cs.asp",
        data: 'EmailAddress='+ EmailAddress + '&amp;Password=' + Password,
        success: function() {
        $('#contact_form').html("&lt;div id='message'&gt;success&lt;/div&gt;");
        }

    });

});
    &lt;/script&gt;
</code></pre>
