1. Thomas Waldmann
  2. moin-2.0
  3. Issues
Issue #159 new

json / ajax requests

Reimar Bauer
created an issue

I think we should add a json/ajax interface for some of our views.

e.g. +tags, +index

that makes it easy to use the result of these operations on a different site.

this is an example how it is implemented for fechting geonames, copied from the jquery_ui autocomplete example.

{{{

!javascript

source: function( request, response ) { $.ajax({ url: "http://ws.geonames.org/searchJSON", dataType: "jsonp", data: { featureClass: "P", style: "full", maxRows: 12, name_startsWith: request.term }, success: function( data ) { response( $.map( data.geonames, function( item ) { return { label: item.name + (item.adminName1 ? ", " + item.adminName1 : "") + ", " + item.countryName, value: item.name } })); } }); }, }}}