Jquery, PHP, AJAX, paginated form submission tutorial?

Jquery, PHP, AJAX, paginated form submission tutorial?

Hello all,

I am hoping that someone may be able to point me in the direction of a tutorial that goes from beginning to end and covers the topic of Jquery, PHP, AJAX and a form that updates a specific DIV/AREA with new data pulled from a mysql database on submit.

*That last one is the kicker.

Basically, I have a comment form that I am trying to make more dynamic. I want the form to update a specific area of my page when I submit it. The other tricky part is that the form will have to do this while also paginating the results in that area. For a quick and simple example, check out how Kongregate's comment feature works. I WANT THAT EXACTLY, but I want it to use jquery.

So Far I have come up with this:


var options = { success: postCallback};
   
   function postCallback() {
      alert("The comment was added");
   }
   
   // attach handler to form's submit event
   $('#commentForm').submit(function() {
       // submit the form
       $(this).ajaxSubmit(options);
       // return false to prevent normal browser submit and page navigation
       return false;
   });


That code successfully submits the form but it does not refresh the DIV which contains the paginated results pulled from my MYSQL database.

Please, Help!!
    • Topic Participants

    • dnyce