Morning all,
I’m working on building a page that displays user reports. Reports are of variable length (1 to hundreds of pages) and I would like to cache all the report data (load the full report) before displaying it.
Each report page will come back separately in html format, so I can exploit a php loop to retrieve all the report data before displaying anything on the page. However, this is where my problem begins.
I would like to show only page 1 when the report is opened and cache the full report somewhere.
I then want to add a control that allows a user to flip to page 2,3,etc…, however, I don’t want to invoke a server call at this point (my current implementation will make a server call for each page individually).
The difficulty is with the fact that I can’t populate a php array and invoke this in a JavaScript-kind-of way, because the php variables will be gone at the point the page is loaded. Also, due to the potential size of reports (hundreds of pages each containing many lines of html) I am also unsure about creating JavaScript dynamically.
What would be the best way to go about this?
Thanks in advance for any input.