2013-02-06 70 views
0

$( 「#btnLogin」)點擊(函數(){jQuery的Ajax調用導致未定義的錯誤在Firefox 18.0.1

  if (order != "undefined") 
       $.ajax(
       { 
        type: "POST", 
        data: "{'NewOrder': '" + order + "'}", 
        url: "imgpost.aspx/Update", 
        dataType: "json", 
        contentType: "application/json", 
        processdata: true, 
        beforeSend: function (xhr, data) { 
         console.log(data); 
         alert(data); 
        }, 
        success: function (msg) { 
        }, 
        error: function (XMLHttpRequest, textStatus, errorThrown) { 
         alert("Error Occured!" + " | " + XMLHttpRequest + " | " + textStatus + " | " + errorThrown); 

        } 
       }); 
     }); 

這裏Ajax調用失敗,而不是重定向到URL:「imgpost。 ASPX /更新」。

的XMLHttpRequest和textStatus分別表示不確定和錯誤。

它occours只在Mozilla的最新更新18.0.1

任何人可以幫助我。

回答

0

刪除對象周圍的引號。

data: {NewOrder: order}, 
+0

我試圖消除qoutes但仍然沒有工作 – kishor

+0

@kishor看到編輯 –

+0

也嘗試過,但它不工作 – kishor

相關問題