Making Large XLS Files with server-side processing
Making Large XLS Files with server-side processing
pkboucher
Posts: 9Questions: 0Answers: 0
I'm using server side with JSP, but I'm a total noob at JS.
I've got a button that changes a variable shouldIMakeXLS from 'No' to 'Yes', and I pass the variable to my server-side with this:
[code]aoData.push( { "name": "makeXLS", "value": shouldIMakeXLS } );[/code]
Then, inside of the server-side, if makeXLS is 'Yes', I skip this pagination line in my SQL query:
[code]sql += " limit " + paginationStartPoint + ", " + paginationAmount;[/code]
Then, I loop through my result set and use paginationStartPoint and paginationAmount to decide which rows to return to the client using [code]ja.put(cellContents)[/code], so the browser sees the right page of output, and I use JExcelApi on ALL the rows, and send the XLS file back to the browser as an attachement (so the user is prompted to save or open it).
My question is probably very easy for people familiar with JS, how to I generate an event when the button is clicked that will cause the server-side handler to get invoked (like it is when I filter or sort the results in the table)?
I've got a button that changes a variable shouldIMakeXLS from 'No' to 'Yes', and I pass the variable to my server-side with this:
[code]aoData.push( { "name": "makeXLS", "value": shouldIMakeXLS } );[/code]
Then, inside of the server-side, if makeXLS is 'Yes', I skip this pagination line in my SQL query:
[code]sql += " limit " + paginationStartPoint + ", " + paginationAmount;[/code]
Then, I loop through my result set and use paginationStartPoint and paginationAmount to decide which rows to return to the client using [code]ja.put(cellContents)[/code], so the browser sees the right page of output, and I use JExcelApi on ALL the rows, and send the XLS file back to the browser as an attachement (so the user is prompted to save or open it).
My question is probably very easy for people familiar with JS, how to I generate an event when the button is clicked that will cause the server-side handler to get invoked (like it is when I filter or sort the results in the table)?
This discussion has been closed.
Replies
Allan