Lab 12: Ajax

Last modified by Anca Luca on 2010/05/27 09:47

References

Standards & tutorials

Tools

Practice

Before trying your hand at these exercises, read the course and the examples at http://www.infoiasi.ro/~busaco/teach/courses/web/web-film.html#s13.

Also, think of implementing these exercises in the context of your own project, where they match purpose (or proposed feature can be slightly adjusted to fit).

Tags suggest (ajax)

Continuing the exercise TagsSuggest in lab 8, get the suggestions to show to the user from the server, using Ajax. The strategy is that every time the user types something in the input ("keyup" event), an AJAX request is sent to the server with the value of the input and the server sends back a list of matching tags, which are then loaded inside the suggestions panel.

Tags suggest (JSON)

For the exercise above, return the results from the server in JSON format, process them and use them as an object.

Tags suggest (with libraries)

Rewrite the TagSuggest exercice above, using one of the JS Libraries (prototype, or jQuery or other).

Using external js API *

Find and experiment with an external service available as a JS API (maps services in general, google search API, google calendar API, etc -- more complete list at programmable web js APIs). How do they work? Keep an eye on the firebug's Net tab (chrome Resources tab, or similar for other tools) and see what are the ajax requests, to where, and what's the data they bring in.

Writing a Ajax API for your data *

Write an API for other applications to be able to use the data of your project directly in Javascript.


Tags:
Created by Anca Luca on 2010/05/26 23:07

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 2.2.1.27354 - Documentation