I want to get response of form's submit event in jquery or javascript ?
I am firing form's submit event like that in jquery :-
$(form).submit();
actually for checking the response i am doing it like that :-
alert('resp=' + $(form).submit());
And below is the action method :-
public ActionResult SaveProduct(ProductViewModel model)
{
if (ModelState.IsValid)
{
return Json(true);
}
else
{
return Json(false);
}
}
So its just returning true or false. But i getting below response in alert(where i trigger it) :-
[object object]
And i want to know that,how i can get the submit event response like that ?