How to use AJAX to get the next / previous page.
How to call the browser:
page.php?page=1-1
or
page.php?page=1
Refund is just text.
Must load pages in this format:
1-1 or 1
When the user presses the button (s) of the next / previous page, how do I pass this page number to an ajax call and display the results.
Also, how can I track which page the user is viewing? And how do I put max min for pages, for example, I have 100 pages does not cause a call for page 101
http://jsfiddle.net/2b8gR/5/
HTML
<input id="loadPages" name="loadPages" type="button" value="Next" /> <input id="loadPages" name="loadPages" type="button" value="Previous" /> <div id="displayResults" name="displayResults"> </div>
JS (this does not work)
$("#loadPages").click(function(){ $.ajax({ url: 'page.php', data:{'page': '1-1'}, error : function (){ alert('Error'); }, success: function (returnData) { alert(returnData); $('#displayResults').append(returnData); } }); });
jquery ajax jquery-mobile request
Phill pafford
source share