I have an Ajax call using the following:
var ajaxurl = "<?php echo admin_url('admin-ajax.php'); ?>";
// This does the ajax request
$.ajax({
url: ajaxurl,
data: {
'action':'update_sub',
'data' : new_sub
},
success:function(data) {
// This outputs the result of the ajax request
console.log(data);
},
error: function(errorThrown){
console.log(errorThrown);
}
});
On successfully submitting the data, how can I reload the current page?