|
The problem (I believe) is that a <button> will just create a push button - something that can trigger an onClick in javascript instead of using a hyperlink.
In order to make that button DO anything, you need to create it as a form submit button, that will POST your data back to the server, where your script can query the next batch of data from the db and move the user along.
Why would you want to do this via javascript, when it's an incredibly basic function of form data interacting with PHP? Perhaps in the case of an AJAX call to refresh data without reloading the page, but in that case, the onClick should call a javascript function that makes the xmlHttp request to the server and replaces the content of your div with the paginated data.
I don't believe (personally, and I could be wrong) that you will EVER get that button to do anything the way it is coded there. It isn't submitting any data to the server to run your script and return the new data.
|