well, I see three function calls bolded, but what you need to do is call just ONE function and from that function you do your first ajax call. On that first ajax call, you should have a callback function - the function that executes upon completion of the ajax request. WITHIN THAT callback function call your other ajax function - ex:

<script>
function clickHandler(cb){
disablebatch();
//assuming that the following two are making the ajax calls
//then calling these sequentially will still give you problems
// selectinactivecourse(cb.checked);
// allbatches(cb.value);
//
//instead call the first one, passing the checkbox reference
//(intead of just true/false):
selectinactivecourse(cb);
}
function selectinactivecourse(checkBox)
{
//here you checkBox.checked will evaluate to true or false
//depending on the state of the checkbox. So by passing the reference
//to the checkbox you still can get the needed info you had previously
var isChecked=checkBox.checked;
//doyour ajax stuff
xhr=...;
//here you have your anonymous callback function
xhr.onreadystatechange=function(){
if( xhr.readyState==4)
{
allbatches(checkBox.value);
}
};
xhr.send(...);
}
</script>
<input type="checkbox" value="<?php if(isset($_POST['inactive_check'])) echo $_POST['inactive_check']; ?>" onclick="clickHandler(this)" id="inactive_check" name="inactive_check" <?php if(isset($_POST['inactive_check'])) echo "checked";?>></div><div style=" float:left; padding-top:2px; padding-left:5px;">