I know this is old, but in case it helps anybody else that stumbles across this...
what I usually do is set some kind of flag in my frontend forms to denote that the incoming request is ajax.
<input type="hidden" id="my_ajax_flag" name="my_ajax_flag" value="false" />
Initially this is set to "false", which i then toggle to "true" while beginning to process the ajax.
$('#my_ajax_flag').val('true'); // example using jQuery
then in the admin side of my code, i check for that parameter and then either include my ajax hooks or perform my regular non-ajax admin stuff. So for example:
if ( isset( $_REQUEST['my_ajax_flag'] ) && $_REQUEST['my_ajax_flag'] == 'true' ) {
add_action('wp_ajax_my_ajax_function', 'my_ajax_function');
add_action('wp_ajax_no_priv_my_ajax_function', 'my_ajax_function');
} else {
// regular non-ajax stuff
}
depending on what you need to do, there are multiple variations of this idea, but it allows you to keep your regular admin code from interfering or firing while performing ajax requests.
another recommendation that can be handy is setting the WordPress "noheader" attribute in your forms.
<input type="hidden" name="noheader" value="true" />
when doing backend processing that ultimately results in a redirect (recommended for avoiding the dreaded double form submission), in rare fringe cases where you need to access wp hooks that would normally occur after "headers already sent".