Skip to content

AJAX Usage

Victoria Bobey edited this page Nov 4, 2016 · 8 revisions

Profile Page

Profile Page

When viewing another author's page, a button will be displayed in the top right corner that allows the user to perform a follow/friend action.

When the button is clicked, an ajax request is sent to update the relationship state. Upon success, the button will be updated to display the appropriate action (unfollow, unfriend, follow, or accept friend request) for the new state.

Manage Friends and Manage Who I Am Following

Manage Friends

Ajax requests are sent in a manner similar to the profile page.

Manage Friends: Upon page load, all friends as displayed with an Unfriend button. When the Unfriend button is selected, the author is unfriended and the button is updated to Accept Friend Request.

Pending Friend Requests

Friend Requests When I accept or decline a friend request, an ajax response is sent. Upon success, the friend request is no longer displayed on the page.

Clone this wiki locally