the scenario needs to run like this: client uploads CSV file which then dynamically populates a table with the data from the uploaded CSV file.
i can upload the CSV file with a simple form. no problem.
i can parse the data with PHP on the server side. no problem.
i can create an array with PHP server side. no problem.
how the hell do i get it back to JavaScript for processing? i thought i could AJAX it, but where would i point the request?
i thought about using PHP to recursively call the page, but then it loses it asynchronicity, which is not okay.
seems like i’m missing something simple here.
TIA for your help.
WR!
The answer is simple. Upload the document asynchronously, and have that upload call return some JSON.
Alternatively (and better for larger documents), upload the document and have the server return an ID, and then call a script with AJAX with that ID. That way, you can do background processing on a large file, and return the data when ready, or return some sort of waiting status, where the client waits for 5 seconds or so and tries again.