2012-05-16 3 views
0

하이 내 응용 프로그램이 서버와 통신을 시도, 그래서 난 아약스에서 웹 서비스를 호출, 지금은 ajax.anybody의 시간 간격을 설정하려면 indly 나에게아약스 자바 스크립트에서 타이머 컨트롤을 설정하는 방법?

$(document).ready(function() { 
    $("#btn").attr("disabled", true); 
    //waitingDialog({}); 
    document.addEventListener("deviceready", onDeviceReady, false); 

    function onDeviceReady() { 
     var imei2 = ''; 
     imei2 = device.uuid; 
     checkConnection_inonload(imei2); 
    } 

    function checkConnection_inonload(imei2) { 
     var networkState = navigator.network.connection.type; 
     alert(networkState); 
     var states = {}; 
     states[Connection.WIFI] = 'WiFi connection'; 
     if (states[networkState] == 'WiFi connection') { 
      $.ajax({ 
       cache: false, 
       async: true, 
       type: "GET", 
       dataType: "json", 
       url: "http://xxxx/Service1.svc/GetKeepMeStatus", 
       data: { 
        IMEINO: imei2 
       }, 
       contentType: "application/json;charset=utf-8", 
       success: function (r) { 
        //closeWaitingDialog(); 
        //alert(r); 
        if (r == "status") {} 
       }); 

답변

0

을 안내 난 내 아약스 기능 timeout:3000에 시간 제한을 설정 그 지금 일하고있어.

관련 문제