Skip to content

AJAX Usage

Victoria Bobey edited this page Nov 27, 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 if the author has no relationship with the profile author.

When the button is clicked, an ajax request is sent to update the relationship state. Upon success, the appropriate status (following, friend request sent) will be displayed as read-only text.

Manage Friends and Manage Who I Am Following

Manage Friends

Ajax requests are sent each time a button is clicked to update the relationship.

Manage Friends: When the Delete button is selected, an ajax request is sent. Upon success, the author's row is removed from the table.

Manage Who I Am Following: When the Unfollow button is selected, an ajax request is sent. Upon success, the author's row is removed from the table.

Pending Friend Requests

Friend Requests

When a friend request is accepted or declined, an ajax request is sent. Upon success, the friend request is no longer displayed on the page.

Clone this wiki locally