1
function sendMsg(){
$.ajax({
beforeSend: function(){
$("#loading").dialog('open').html("<p>Please Wait...</p>");
},
url: "${pageContext.request.contextPath}/WhoopieeMerchantAppConversationList", //(dynamically generated by product item), //(dynamically generated by product item)
type: "get",
data:"to_userid="+document.getElementById('to_userid').value+"&store_id="+document.getElementById('store_id').value+"&merchant_id="+document.getElementById('merchant_id').value+"&msg="+document.getElementById('msg').value,
success: ajaxSuccessHandler
});
}
function ajaxSuccessHandler(obj) {
if(obj=="error")
{
$('#loading').html("<p style='font-size:18px;'>Msg Already Sent</p>");
}
else
{
$("#loading").dialog("close");
alert("Message Sent Successfully");
var redirect_link = document.getElementById('redirect').value;
setTimeout(function(){window.location.href=redirect_link},0);
}
}
후 닫습니다,하지만 여전히 당신이를 다시 사용하지 않으려면,JQuery와 대화 상자 아약스 성공 난 아약스 호출 후 대화 상자를 닫으려면
왜 경고를이 시도 ??? 대화 상자를 닫기 전에 그냥 쓰십시오. – mplungjan
경고 상자에서 확인을 누른 후 리디렉션하고 싶기 때문에 대화 상자가 아닙니다. –
모달 대화 상자를 사용하십시오. 경고는 모든 스크립트를 차단합니다. 또는 경고를 setTimeout 내에 두십시오. – mplungjan