How to abort the ajax request and redirect in the ajax callback of form element
If you've got ctools installed (nearly all Drupal sites do), you can make use of ctools_ajax_command_redirect() in your AJAX callback, e.g.

ctools_include('ajax');
$commands[] = ctools_ajax_command_redirect('path/to/redirect');
return array('#type' =&gt; 'ajax', '#commands' =&gt; $commands);