I have a simple contact form for download excel file . Main issue happen , When ajax load .I want to download excel file then redirect user to a next page.. Below is my code wit
In Ajax....Simply you can create an excel file on server ... ajax response will be the path of the excel file...On ajax success open the excel file in new tab (it automatically downloads excel) and at the same time open new tab with new location.
sample code inside ajax success given below
window.open("path to excel..");
window.open("new location");
also can use (if needed)
window.location.replace("new location");
Open multiple links in Chrome at once as new tabs