I have used location.href in my earlier days but now its not redirecting to page. here is my code
function AuthenticateUserWithPage() { var UId = $(\'#amwayId\')
Php:
$form_data = array(); $form_data['message'] = "success"; $form_data['redirect'] = "http://www.example.com/example"; echo json_encode($form_data)
Ajax:
if (data.message == 'success') { window.location.href = data.redirect; return false; }else if(){ etc... }