added the rest of the ajax code for creating a listing.