开发者

several ajax calls on submit?

开发者 https://www.devze.com 2023-03-10 04:54 出处:网络
Is this possible? $(\'form\').submit(function(){ $.post(\"some.php\", { \"array\": submitedarray}, function(data){

Is this possible?

$('form').submit(function(){
            $.post("some.php", { "array": submitedarray}, function(data){
                if(data == "1"){
                    $.post("other.php", function(data){
                        if(data == "1"){
开发者_如何学C                            alert("zzzzzzzzz");
                        }
                    }

                }else
                    alert("Error!");
            });
            return false;
        });

The first ajax call works the second it doesn't how can I make both to work?


Yep! Possible.

Check on Ajax Queue here

and this.

0

精彩评论

暂无评论...
验证码 换一张
取 消