2012-09-24 37 views
0
$.ajax({ 
     type: 'POST', 
     url: "http://myurl:port/projectpath.action", 
     data: formInput, 
     dataType: "TEXT", 
     timeout:600000, 
     async: true, 
     success:function(jqXHR, textStatus, errorThrown){ 

      alert("error :" + textStatus); 
      alert("incoming Text :" + jqXHR.responseText); 
      alert("What ErrorThrown :" + errorThrown); 
      $('#loader').hide(); 
      window.location.replace("paymentResult.html"); 
     }, 
     error:function(jqXHR, textStatus, errorThrown){ 

      alert("error " + textStatus); 
      alert("incoming Text " + jqXHR.responseText); 
      alert("What ErrorThrown" +errorThrown); 
      $('#loader').hide(); 
      //alert(xhr.status+" Server Unavailable! Please try again later"); 
     } 
    }); 
    return false; 

}); 

我就要超時,雖然我設置了ajax時間out..and在配置文件中我也提到了超時...它仍然是越來越超時.. 。黑莓WebWorks的應用越來越超時

alert("What ErrorThrown" +errorThrown); 

上述節目和我的配置文件中的警報消息,我傳遞的參數是:

"rim:connection timeout="600000"" 
"id"TCP_WIFI"/id" 
"id"MDS"/id" 
"id"BIS-B"/id" 
"id"TCP_CELLULAR"/id" 
"id"WAP2"/id" 
"id"WAP"/id" 
"/rim:connection" 

請幫助我。

在此先感謝

回答

0

在你的config.xml,你還應該設立一個訪問元素。

<access uri="*" subdomains="true" /> 

您確認您是否已經這樣做了嗎?如果是這樣,它仍然沒有迴應,你能告訴我你的目標是什麼操作系統/設備嗎?如果它運行的是BlackBerry OS 7或更高版本(或PlayBook/BB10),則可以使用遠程Web檢查器實時觀看ajax請求發生的情況,並以此方式進行調試。

更多關於Remote Web Inspector...

+0

是的,我在我的config.xml中使用訪問uri參數。但仍然問題是..有幾個othar url調用在我的項目中他們工作正常......但只爲這個特定的URL它給警報中的「網關超時」(「什麼錯誤」+ errorThrown); 。所以你可以請plz告訴我有關... – user1695579

+0

是的,我在我的config.xml中使用訪問uri參數。但問題仍然存在..有幾個othar url調用在我的項目中他們工作正常...但只爲這個特定的網址,它提供了一個「網關超時」警報(「什麼錯誤」+ errorThrown); 。所以你可以告訴我有關...我使用黑莓操作系統6..handset9300 – user1695579

0

你只使用WiFi時看到了同樣的結果嗎?關閉移動網絡,連接WiFi並查看是否得到相同的結果。