I have 2 separate pages, index and add_data. Initially, index page is open and this page has a link that opens add_data page in a different tab. Now add_data page has a form whose data is getting saved through ajax.if the ajax returns a success message, I wish to refresh the index page.
code on index page responsible for redirection
<a href="<?php echo base_url(); ?>class/add_data" target="_blank">Add Data</a>
Code of ajax on add_data page
jQuery.ajax(
{
type: "POST",
url: "<?php echo base_url(); ?>" + "class/student/" ,
data: formData,
processData: false,
contentType: false,
success: function(res)
{
console.log(res);
},
});
Can anyone please tell how this can be done