javascript - Jquery ajax on IE11 -


i have problem here. use jquery ajax send request end server , return clue notice if request proceed or not. had try in ie8 , ie7, jquery ajax works well, when try on ie11, error few times, , work after that. question is, how make run on ie11 without have wait few times?

this jquery ajax script

    var value = $("#record"+index).attr('value');     var hiddenamount = number ($("#hiddentotalamount").val());     var values=value.split('/');     var uncheckedamount = number(values[1]);     var realamount = 0;     var realrecord = number ($("#totalrecord").val());     var checkeddoc = $("#record"+index).val();     var datastring = "action=validatedocnum&holddocnum="+checkeddoc;     if($("#record"+index).attr('checked')){          $.ajax({             type: "post",             url: "executesp2d.do",              data: datastring+"&act=check",             cache: false,               success : function(msg) {             console.log(msg);             console.log(msg.result);             msg.result=$.trim(msg.result);             if(msg.result=="1"){                 /* $("#uncheckrecord").dialog('close'); */                 realamount = hiddenamount + uncheckedamount;                 realrecord = realrecord + 1;                 $("#totalrecord").val(realrecord);                 $("#hiddentotalamount").val(realamount);                 realamount = accounting.formatmoney(realamount, "", 2, ".", ",");                 $("#totalamount").val(realamount);             }else{                 alert('fail uncheck records');                 $("#record"+index).attr('checked', false);              }             },              error: function() {                 alert('fail check records');                 $("#record"+index).attr('checked', false);               }          });      }else{          $.ajax({             type: "post",             url: "executesp2d.do",             data: datastring+"&act=uncheck",             cache: false,              success : function(msg){             console.log(msg);             console.log(msg.result);             msg.result=$.trim(msg.result);             if(msg.result=="1"){                 realamount = hiddenamount - uncheckedamount;                 realrecord = realrecord - 1;                 $("#totalrecord").val(realrecord);                 $("#hiddentotalamount").val(realamount);                 realamount = accounting.formatmoney(realamount, "", 2, ".", ",");                 $("#totalamount").val(realamount);             }else{                 alert('fail uncheck records');                 $("#record"+index).attr('checked', true);              }             },              error: function() {                 alert('fail uncheck records');                 $("#record"+index).attr('checked', true);               }         });     } 


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -