嵌套的jQuery ajax调用在Firefox中不起作用

时间:2013-01-17 11:01:28

标签: jquery ajax firefox

我有一个脚本调用jQuery ajax函数互相嵌套 - 该脚本适用于Chrome和IE9,是否有理由不想在Firefox中运行?

代码发布在下面:

$.ajax({ 
                type: "POST", 
                cache: false, 
                url: "addwelder.php", 
                data: "mywelderid="+$welderid,
                success: function()
                {
                    $.ajax({ 
                        type: "GET", 
                        cache: false, 
                        url: "loadwelder.php", 
                        dataType: "json",
                        success: function(data)
                        {
                            $("#mywelders:last-child").append("<option value=" + data[0].toString() + ">" + data[1].toString() + "</option>");
                            $("#mywelders option:last").attr("selected","selected");
                        },
                        error: function(xhr, exc)
                        {
                            alert(xhr.status);
                            alert(exc);
                        }

                    });
                },
                error: function(xhr, exc)
                {
                    alert(xhr.status);
                    alert(exc);
                }

            });

0 个答案:

没有答案