Am working in jQuery mobile and PhoneGap. Currently am facing a big issue which still existing. I searched and applied lot of methods but still problem existing. My Problem is when I call an API its timeout after 10 Seconds. So its not getting result in iPhone versions.. but Its return result in Android (In the case of android its also shows timeout but i get its result.)
I Tried Timeout methods in jQuery Ajax call.. but :-(
Here is my code ;
function proceed_payment(){
var cardholder_= $('#input_Cardholder_name_').val();
var card_num_ = $('#input_CreditCard_').val();
var payment_ =$('#card_type_').val();
var cvv2_=$('#input_cvv2_').val();
var url;
if(showmond_value==0)
{
url='https://www.sample.com/json/save_pament.php?json=1& reserv_num='+reservation_number+'&callback='+reservation_carcompany+'&cardholder='+cardholder_+'&payment='+payment_+'&card_num='+card_num_+'&card_cvv2='+cvv2_+'&card_expire_mon='+expire_month+'&card_expire_year='+expire_year+'&org_deposit='+sCarDeposit+'&org_cur='+currency+'&mond='+company_Show_mond+''
}
$.ajax({
url:url,
data:'',
contentType: "application/json; charset=utf-8",
type: "POST",
dataType: "json",
timeout: 15000,
crossDomain:true,
cache: false,
async:false,
success:function(data)
{
alert(data.Status);
}
});
};
Time out Screen shot(checking in Eclipse)..