在Chrome中警报未显示,在IE中工作正常。点击chrome中的其他选项卡,因为ajax调用刷新了标签,我想保持ajax调用,但在此之前显示警告 - “你只能输入手动时间”
if(parseFloat(time_compare) >= parseFloat(stopTimer)){
//$(".end-time-timesheet").trigger("click");
var count = 0
if(count == 0){
alert("You can enter only manual hours.");
count = count + 1
}
if(count == 1){
clearInterval(handler);
var isstart1 = 0;
var ticket_no1 = "";
if($("#ticket_no").val()!=""){
ticket_no1 = $("#ticket_no").val();
}
$.ajax({
async: false,
type: 'get',
url: '/check-timesheet-isStart?user_check='+@user_check+'¤tSelectedDate='+currentSelectedDate,
data: '',
success: function (data) {
if(data != ""){
var url = "/saveTimesheet?ajax=1&isstart="+isstart1+"&date="+currentSelectedDate+"&ticket_no="+ticket_no1+"&t="+Date.now();
$.ajax({
async : false,
type : 'post',
url : url,
success : function (data) {
window.location.href=window.location.href;
jQuery(".timesheet-wrapper").html(data);
calculateTotalHour();
//$("#pop-box-over").hide();
}
});
}else{
window.location.href=window.location.href;
}
}
});
}
}
答案 0 :(得分:0)
弹出窗口拦截器行为可能有所不同。关闭Chrome的弹出窗口拦截器,看看会发生什么。