emulate what the page will look like on the client side using php?

chronoel

New member
hi i have this problem. i tried removing the sorting and changing the structure of a table from the server. so it's done on the client side using javascript. additionally, the structure of the table changes when i opt to do some grouping adding additional headers as need. just imagine that the structure of the table has changed.

now i'm having a problem. i added an option for the user to export the current view of the table to excel/csv or pdf. now how do i communicate the current structure of the table to the server.

now i was thinking if there is a code that would emulate the look on the browser. i will just send the sorting and grouping information back to the server. and the server will have to some transformation on the table just as javascript did. but this would be too ackward for me. i would maintain separate codes for the server and the client while they both do the same thing. i would run into problems when i do changes.

another option i was thinking is to let javascript do the export on the client side. is this possible? possibly through xslt transformation? how do i make a file that can be downloaded by the user in javascript?
 
Back
Top