Dynamic select lists (dependent dropdowns)
On your callback function, you need to setup a callback help. Basically getting your form data. Now my code is for D6 so some functions might be slightly different but check this out.
I left some of my tweaks in there. You'll just have to adjust accordingly.  but the big thing is the callback helper function.

function MOD_js_callback() {

// use of ajax callback helper to set form variables again
$form = MOD_callback_helper();

// grab form['datacenter_devices'] data and drop into changed_elements
// simply to not confuse rebuilt form with 'global' form
$changed_elements = $form['datacenter_devices'];

// Prevent duplicate wrappers.
unset($changed_elements['#prefix'], $changed_elements['#suffix']);

// concat status_messages and call drupal_render to render elements array for output.
$output = theme('status_messages') . drupal_render($changed_elements);
drupal_json(array(
    'status'   =&gt; TRUE,
    'data'     =&gt; $output,
));
}
function MOD_callback_helper() {

$form_state = array('storage' =&gt; NULL,'submitted' =&gt; FALSE);

$form_build_id = $_POST['form_build_id'];
$form = form_get_cache($form_build_id, $form_state);
$args = $form['#parameters'];
$form_id = array_shift($args);
$form_state['post'] = $form['#post'] = $_POST;
// Enable the submit/validate handlers to determine whether AHAH-submittted.
$form_state['ahah_submission'] = TRUE;
$form['#programmed'] = $form['#redirect'] = FALSE;
drupal_process_form($form_id, $form, $form_state);

$form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id);

return $form;
}