Have you ever built a form in Drupal that loads content with ajax and, and has a pager for that content, but found that the pager is broken? It either leads to a JSON page, or a WSOD, but either way it doesn't show the next page of content. I've handled this various ways over the years, but I think I've settled on the below method as being the most Drupal-friendly, as it's almost entirely integrated with the Drupal Form API, and only needs the addition of a single JavaScript file to ajaxify the pager links.

This tutorial creates a form with the results on the same page, and a pager for the results, and works both with and without AJAX.

http://www.jaypan.com/tutorial/drupal-7-forms-ajax-loaded-content-and-wo...