I have a login form when user logs in he has to redirect with to participant-screen.php
Ajax script
$.ajax({
url: "controller.php",method: "POST",
data: { loginData: $("#loginForm").serialize(),'action': 'login' },
dataType: "text",
success: function(response) {
$("#showMessage").html(response);
if (response == 'success') {// response coming as success but not redirecting
// redirecting script
}
}
});