Ajax based table sorting