AutoComplete Widget :: XML Data Flickr Web Services

DataSource

This DataSource instance points to Flickr Web Services, via a simple PHP proxy. The DataSource schema is defined for XML data. In order to be compatible with the Flickr application, the scriptQueryParameter has been customized to be "tags", and scriptQueryAppend has been defined to pass in additional arguments. Finally, the cache has been disabled so that each query is forced to make a trip to the live source.

AutoComplete

This AutoComplete instance defines a robust formatResult() function that formats the result data into HTML markup that displays an image from Flickr and its title. The autoHighlight feature has additionally been disabled.

Enter Flickr tags to find a photo (separate with commas):

Sample Code

CSS:

Markup:

JavaScript: