현재 체크 박스가있는 표가 있습니다 - 체크 박스를 클릭하면 프로필이 업데이트되었다는 경고가 팝업됩니다. ajax circle gif로 변경하는 것만으로 경고 대신 어떻게 변경합니까? 나는 innerhtml을 가진 div에 이것을 푸시 할 수 있고 그것을 텍스트 경고로 만들 수 있다는 것을 알았지 만, div를 제거하는 방법을 모른다. 체크 박스에 대한아약스 이미지 서클로 변경 체크 박스
코드 :
<div id='dropdown<%= proId + entitlements[i].Id.ToString() %>'>
<%using (Ajax.BeginForm("UpdateProfileByProfileAdmin", new AjaxOptions { OnBegin = "function(){ ShowProgress(" + proId + entitlements[i].Id.ToString() + ");}", OnComplete = "function(){ HideProgress(" + proId + entitlements[i].Id.ToString() + ");}" }))
{
if (reqMode == "Edit")
{%>
<%=Html.CheckBox(proId + entitlements[i].Id.ToString(), profile.PresenceIndicators[i], new { onclick = "CheckEnt('" + proId.ToString() + "', '" + profid.ToString() + "','" + URLUpdateProfile.ToString() + "','" + entitlements[i].Id.ToString() + "','" + softwareId + "')", @class = "riskRank_dd" })%>
<%}
else
{%>
<%=Html.CheckBox(proId + entitlements[i].Id.ToString(), profile.PresenceIndicators[i], new {disabled = true})%>
<% }%>
<input type="submit" value="Go" class="hiddenSubmit" />
AJAX 방법 :
$.ajax({
type: "Post",
url: URLUpdateProfile,
data: "processProfileId=" + processProfileId + "&enabled=" + value + "&entitlementId=" + entitlementId + "&softwareId=" +softwareId,
success: function(affectedRows) {
if (affectedRows == "\"0\"") {
alert('Unable to update. Please check');
$('#' + id).attr('checked', !value);
}
else if (affectedRows == "\"-2\"") {
alert('Profile have no entitlements selected. Please check.');
$('#' + id).attr('checked', !value);
}
else if (affectedRows == "\"1\"" || affectedRows == "\"2\"") {
alert('Profile is updated successfully.');
}
else {
alert('The profile is duplicating with' +' '+ affectedRows+'.'+' '+'Please check.')
$('#' + id).attr('checked', !value);
}
}
});
몇 가지 코드를 쓸어 주실 수 있습니까? 감사 – rbur0425