Talk:Ajax Proxy

From ADF Docs
Jump to: navigation, search

Need to add documentation around the use of jsonp example below:

// get latest content
$.ajax({
   url:"#ajaxProxy#",
   data: ( { bean: "communityTrends", method: latestMethod, renderCount: 5,
       returnFormat: "json", jsonpCallback: "latestResults"} ),
   dataType: "jsonp",
   type: "get"
});

function latestResults(results){
   for( i=0; i < results.length; i++ )
   {
      item = buildItem(results[i])
      $("##" + panel + " .latest").append(item);
   }
}