2009-12-16, 03:15 PM
AJAX Posts Updater
Idea:
- User click Page 2, 3, 4, etc at the top of thread.
- No new page needs to be loaded (header, footer, etc, stays the same)
- Posts on page are updated to the next page worth of posts
- Optional: Loading bar/image
Example: If your forum settings are to display 10 posts per page...
- User visits thread
- User clicks Page 2
- Posts 11-20 are loaded into the posts 1-10
Thoughts?
edit:
My first guess would be something like this:
Help would be much appreciated ^__^
Idea:
- User click Page 2, 3, 4, etc at the top of thread.
- No new page needs to be loaded (header, footer, etc, stays the same)
- Posts on page are updated to the next page worth of posts
- Optional: Loading bar/image
Example: If your forum settings are to display 10 posts per page...
- User visits thread
- User clicks Page 2
- Posts 11-20 are loaded into the posts 1-10
Thoughts?
edit:
My first guess would be something like this:
<script type="text/javascript">
function posts_load(page)
{
new Ajax.Request('showthread.php', {method: 'get', onComplete: function(request) { $('postsdiv').innerHTML = request.responseText; }});
}
posts_load(1);
</script>
...but I have no experience in AJAX at all to do something like this.Help would be much appreciated ^__^