How do I create a progress bar? I need to implement a progress bar using Drupal 7. This is the code I am actually using.

$form[$name][$name.'_enc'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t($name.' Enable'),
  // '#submit' =&gt; array('submit_'.$name.'_enc'),
  '#ajax' =&gt; array(
    'callback' =&gt; 'submit_'.$name.'_enc',
    'wrapper' =&gt; 'ajax-response-goes-here',
    'method' =&gt; 'replace',
    'effect' =&gt; 'fade',
    'progress' =&gt; array (
      'type' =&gt; 'bar',
      'message' =&gt; 'convert..',
      'url' =&gt; 'misc/progress.js',
      'interval' =&gt; '1500'
)
What you set as ['#ajax']['progress']['url'] is wrong: It's not the URL for a JavaScript file, but it's the callback path to use to determine how full the progress bar is. The menu callback should return a value that indicates if the operation has been completed, or it is completed at 10%, 20%, 50%, etc. Looking at the code contained in the progress.js file, I notice the value is expected to be between 0 and 100.

As side note, the value passed in ['#ajax']['progress']['message'] should be passed to t().