Calling function using post inside another jquery post in jquery
I want to call function using post inside another jquery post like below,
<script type="text/javascript">
$.post("/testcall1",
function(data){
$('#testDiv1').html(data);
$.post('/testcall2',function(data){$('#testDiv2').html(data);});
});
</script>
From the above piece of code, I have to call one after another not at the same time, Will that work first,开发者_运维知识库 if yes will that work in all kind of browser like IE7, IE8, FF,Safari, Chrome
According to http://api.jquery.com/jQuery.post/, the function will be called when 'success' is returned from the first call, yes it will be called after the first, but only when it is success.. And it should work on all the browsers.
精彩评论