star Phase 5 star

AJAX

Due October 30th, 10:00pm

star Assignment star

Nothing too scary for this assignment! You'll be updatign the extensions you made for the fourth phase to use AJAX for seding and receiving data. As before, the functionality from that assignment should be retained. It's again okay to use JQuery for this assignment.

Requirements

Requirement Value
(15pt Total)
AJAX GET Requests 6pt Total

Dynamic Pictures with AJAX

Update the photo detail pages from the previous assignment to use AJAX to GET photo data. Instead of sending all an album's meta-data as a JSON array when php generates the photo detail page, the page will now get that data in the background whenever the user moves to a new picture. Adjust the javascript functions called by the next and previous buttons to fetch the new meta-data using AJAX.

There are a couple of ways of doing this; my suggested approach is to create new php scripts which take in a current photo id via GET and return JSON meta-data for the next and/or previous photos. You shouldn't need to make major modifications to the functions which display the new photo from the meta-data.

6pt
AJAX POST Requests 9pt Total

Message Board with AJAX

You need to update the message board from the previous assignment to post new messages using AJAX.

  1. When a user posts a message to boad, the data should now be sent using AJAX. You should encode the form data as a POST request, requiring only minor modifications to the form handler you wrote for the last phase. The handler should be updated to output an indication the success or failure of the SQL instead of a new webpage.
  2. Use an XMLHttpRequest object to update the webpage based on the response of the form handler to new message requests. Upon failure, users should be alerted to the error. Upon success, the new message should be displayed on the message board, perhaps with an animation showing users that a new message was inserted.
9pt

star Submission Instructions star

As with all homeworks, you will submit this project in a two-step process: