I can get Ajax to send the request successfully but I want it to also redirect to the new page and it’s not redirecting. Could anyone suggest an alternative method or correct way to redirect?
submitHandler: function(form) {
$("div.error").hide();
$.ajax({
type: "POST",
url: '<?php echo base_url().'subscribe/process_payment/'?>',
data: $(form).serialize(),
success: function(msg){
console.log( "Data Saved: " + msg );
},
error: function(msg){
console.log( "Error: " + msg);
}
});
return true;
},
Usually you can simply do the redirect in the success function
or return the url