- View Offline
- Exercise Files
- [Instructor] In the previous movie, we were able…to capture and store the correct ID in the session.…But at the moment, the user doesn't have any indication…whether the Ajax request succeeded or not.…In this movie, we're going to make that clear.…One of the best ways to make it clear…that an item has changed…is to mark it with a different class in CSS.…And it's best if we can do that at the very top level,…the parent of the item, in this case, the blog post class.…So what we want to do is add a class to this blog post…to know that it's a favorite,…so it makes sense that the class would be called favorite.…
We want to do that if we get back a true result.…So if the result comes back…and it's equal to the string true,…not the actual true or false, but the string true,…then we want to take that parent…that we've been working with,…remember that's the parent element of this Favorite button,…we want to take that parent and we want to say that…its classList ought to add,…and then let's put in favorite.…That's going to add favorite to its class list,…
- What is Ajax?
- Creating Ajax requests and responses
- Monitoring Ajax request state and events
- Responding to Ajax requests with HTML and JSON
- Building Ajax buttons
- Submitting forms with Ajax
- Implementing infinite scrolling
- Adding autosuggestions to text fields
Skill Level Intermediate
1. Ajax Defined
What is Ajax?5m 34s
2. Ajax Client
3. PHP Server
4. Ajax Button
5. Ajax Form Submission
6. Infinite Scrolling
7. Search Autosuggest
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.