CodeIgniter Forums

Full Version: after form submit on new tab ajax request are not being sent
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.
I am submitting a form using php on form submit click i am opening a new window using jquery.
after opening the window the php form is submitted on that page but it takes 5 to 10 min depending on the file sizes because i am processing file data which the users uploads and in the new tab i want to show the processed data progress using jquery ajax but on the new window tab the ajax requests are being sent but they are not being sent to the server in the chrome network tab if i click on the sent request it shows me this provisional headers are shown and the server is not returning any response.

but after the form is submission is completed then the jquery ajax request are returning me the status 200k and the response 
Here is my form submission new window open code using jqyery 

Code:
$(".btnDataMigrate").click(function (e) {
               var fileName = $("#filesToUpload").val();
               // var path = $(this).data('popupUrl');$(this).attr("data-evalz")
               var path = $(this).attr("data-popupUrl")
               // alert(path)
                   if(fileName) { // returns true if the string is not empty
                       // alert(fileName + " was selected");
                       window.open(path,'Data Migrate Files Upload Status','width=800,height=800');
                   } else { // no file was selected
                       // alert("no file selected");
                   }
               
           });

Here is the jquery ajax request code 
Code:
function fetch_files_progess(){
           alert('ok')
           $.ajax({
               type:'post',
               url:base_path()+'/data_migration/fetch_completed_files',
               data:{},
               dataType:'json',
               success: function(response){

                   // console.log(response);
                   $('#notice').html(response.result);
                   // setTimeout(function(){fetch_files_progess();}, 3000);

               },
              error: function(response){
              }
           });

         
       }

       fetch_files_progess();
       // alert('fetch_files_progess');

           // do some stuff
           setInterval(function(){fetch_files_progess();}, 9000);


Kindly help me how i can get the response from the jquery ajax request during the form submission process.
Thanks