Add if else function in Ajax Jquery function
- by Naga Botak
Is it possible to add other else function in my JS like this: ?
if response == success redirect to home
if response == failed redirect to failed
$.ajax({
type: "POST",
url: action,
data: form_data,
success: function(response)
{
if(response == 'success')
…