I'm working on a page to process Excel data.
Currently I have an index page where I once submit JSON data (filename, selected columns, worksheet,..) via $.ajax POST to a PHP page for processing (iterate every row with posted selection). But I would like to have some progress response from the processing page. Because now, it just submits and processes everything in the background without knowing if it's done or not.
Is there some kind of way to:
- Redirect to the processing page, along with the JSON POST data, instead of an ajax post?
OR
- Return multiple JSON responses from one PHP page (like started, stopped,..) and fetch those responses in the same $.ajax success function? Add some kind of check function like
IF last response-line == started, show image
..after a while (keep checking json response..),
IF last response-line == finished, hide image?
I couldn't use the form submit action, because I'm sending a full JSON string instead of seperate input values.
Am I overlooking something here or is this just not possible (with my way of processing)?