[jQuery] Ajax Request Order

[jQuery] Ajax Request Order


Hello,
I have a page that makes two ajax calls when the function is called. I
have noticed while testing the page that sometimes the second request
does not run, the first request works but then sometimes the second
ones gets skipped.
Is there a way to make sure the second request fires only after the
first one?
Here is my code below:
<script type="text/javascript">
function InsertOrder(id,tbl) {
$.ajaxSetup({dataType: "html"})
$.get('demo_orders.asp?PID=' + id + '&TBL=' + tbl,function(datanew) {$
('#pos-diner-left-mid').empty();$('#pos-diner-left-mid').append
(datanew);})
$.get('order_total.asp?TBL=' + tbl, function(datanew){$('#pos-header-
total').empty();$('#pos-header-total').append(datanew);})
}
</script>
Thanks
James