how do you paginate and sort in this scheme?
Posted: Fri Sep 10, 2010 4:20 pm
Hello
The scenario is this:
I have a grid of pictures
When I click on a pic, an onclick event sends a parameter to an ajax function. This function forwards that parameter to a php script.
This php script contains both the sql and the echo for creating the table.
The result is that without actually leaving the page of the grid of pictures, a table is displayed below the grid of pictures.
That is cool, yes, but now, how do you sort and paginate that ?
I have the sort and paginate php code, but because of that scheme, it makes it more complicated. If I put al the sort and paginate code in the processing php file which had the sql and table creation code, that script calls itself, therefore, showing nothing upon refreshing, other than an empty table, as al the html was on the original page that sent it the parameter.
I dont even know whether this can be made like this.
thanks,
best regards
The scenario is this:
I have a grid of pictures
When I click on a pic, an onclick event sends a parameter to an ajax function. This function forwards that parameter to a php script.
This php script contains both the sql and the echo for creating the table.
The result is that without actually leaving the page of the grid of pictures, a table is displayed below the grid of pictures.
That is cool, yes, but now, how do you sort and paginate that ?
I have the sort and paginate php code, but because of that scheme, it makes it more complicated. If I put al the sort and paginate code in the processing php file which had the sql and table creation code, that script calls itself, therefore, showing nothing upon refreshing, other than an empty table, as al the html was on the original page that sent it the parameter.
I dont even know whether this can be made like this.
thanks,
best regards