Code first:
/ AJAX process
$.ajax({
type: "POST",
dataType: "json",
data: {"objectId": objectId},
async: false,
url: "allTask.jsp" ,
success: function(result){
// AJAX
step_curr = steps_arr.indexOf(result["current"])+1;
// curr
curr_arr = steps_arr.slice(0, step_curr);
// result
for(var e in result){
if(...){
objj["XXX"] = result[e];
} else {
var _j = curr_arr.indexOf(e.slice(6));
if( _j > -1){
objj[""+curr_arr[_j]] = result[e];
}
}
}
// group33 .group33 : display:none
curr_name = result["current"];
$.each(result, function(index, value, array){
if(...)){
for(var k=0; k<value.length; kPP){
if(A && B) {
**$(".group33").show();
$("-sharpsubmit").attr("data-tid", "xxxx");**
break;
}
}
}
});
//ystep....
$(".ystep").loadStep({
steps: steps_arr,
step: step_curr,
objj: objj
});
$(".ystep").setStep(step_curr);
},
error:function(e,r,a){
console.log("!!");
}
});
code as above,
target; execute the following two sentences:
$(".group33").show();
$("-sharpsubmit").attr("data-tid", "xxxx");
< hr >
actual situation:
in browser debug mode (and with a breakpoint), the code does go in and execute the above two statements.
however, these two statements are not executed in browser normal mode.
= (ask the great god.) =
Is WHY?
the reason why ajax is asynchronous? But I didn"t find anything caused by asynchronism. Reason)
.