You are here

function mostpopular_items_ajax in Drupal Most Popular 6

Same name and namespace in other branches
  1. 7 mostpopular.module \mostpopular_items_ajax()

Returns a JSON object containing the items HTML in it's 'data' property.

Calls mostpopular_get_items($sid, $iid);

Parameters

integer $sid: The service ID of the currently-selected service.

integer $iid: The interval ID of the currently-selected interval.

1 string reference to 'mostpopular_items_ajax'
mostpopular_menu in ./mostpopular.module
Implements hook_menu().

File

./mostpopular.block.inc, line 44
Defines all the pages, blocks and themes for rendering the most popular data to general users.

Code

function mostpopular_items_ajax($sid, $iid) {
  $items = mostpopular_get_items($sid, $iid);
  drupal_json(array(
    'data' => $items,
  ));
  exit;
}