0
다음 코드는 html 페이지에서 process_2 배너 버튼을 클릭 할 때 실행됩니다. 이 코드는 Firefox를 사용할 때해야 할 일을합니다. Chrome과 Internet Explorer를 사용할 때 ajax 코드가 호출되었지만 코드가 의도 한대로 div spinner_block이 표시되거나 숨겨지지 않습니다. 내가 크롬에 불을 지르고를 열고 .css("display","block")
문 후 아약스 호출 (전 중단 점 권리를 놓습니다. spinner_box <div>
쇼를하고 아약스 호출이 돌아 오면, 그것은 숨기는 경우 는 이상하게도 충분히 작동합니다.이 기능은 Firefox에서는 작동하지만 Chrome이나 IE에서는 작동하지 않는 이유는 무엇입니까?
당신은 무엇을 볼 수 여기에 잘못 가 대단히 감사합니다 안드레스
$('#process_2banner').on("click",function() {
var postdata = "lead_id="+rowId; //needs to include the pidm of the user clicking the button
$('#spinner_box').css("display","block");
$('#spinner_box').html('Wait, we are processing the record..');
$('#spinner_box').css("display","block");
$.ajax({type: "POST",
url: "insert_srwordpress.php",
data:postdata,
success:function(result) {
if (result.isOk == false) {
alert('Some error occurred while writing Banner') }
else {
$('#spinner_box').hide();
}
},
async: false});
});
'async : false', 동기식 AJAX에서 좋은 것은 없습니다. – Musa
당신이 맞습니다, 그것이 문제였습니다 :-) – MisterWalrus