How do you remove the throbber from drupal 7 Ajax link?

mirzu picture mirzu · May 23, 2011 · Viewed 11.6k times · Source

we are using drupal 7 ajax framework to load content on a page. When the link is clicked a throbber shows up after the link while the request is processed.

I can't find documentation on how to set or remove the throbber. In a form it looks really simple, but using an ajax link and a callback menu item I can't find any documentation.

I see that there is a $settings variable that can be passed to the ajax_command_html function, but I don't see any docs as to how it should be formatted.

Answer

Trey picture Trey · May 24, 2011

when you build your form item you need to define the "progress" property:

$mycheckbox=array(
  '#type' => 'checkbox',
  '#title' => 'Load it up',
  '#ajax' => array(
      'callback' => 'ajax_example_callback', 
      'wrapper' => 'checkboxes-div',
      'effect' => 'slide', 
      'progress' => array('type' => 'none'),
    ),
);

You can find more information and examples here