-2

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?

Rob
  • 6,304
  • 24
  • 83
  • 189

1 Answers1

1
success:function(data) {
    location.reload();
},
Mitya
  • 33,629
  • 9
  • 60
  • 107