At the begining I return false for form submittion
$("#Login").submit(function () {
return false;
});
And when 1 condition met
$.post(url,data,function(resp)
{
$('#'+id).parent().find('.alert-danger').remove();
if(resp === " ")
{
$("#Login").submit(function () {
return true;
});
console.log("Dang");
}
I want when object resp
is empty to turn form submition to true and when hitting Submit Button, form should submit.
Change:
if(resp === " ")
To:
if(resp === "")
Change resp === " "
to resp === ""