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.
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.
Thank you
$(function() {
var EmailAddress = $("name=EmailAddress").val();
var Password = $("name=Password").val();
$.ajax({
type: "POST",
url: "signin.cs.asp",
data: 'EmailAddress='+ EmailAddress + '&Password=' + Password,
success: function() {
$('#contact_form').html("
success
");
}
});
});