Implementing ajax navigation

Fixed a little bug in upload.js.