I am having a check box.when its checked i need to show a alertify.confirm box that same value is selected.If yes is selected check box should be selected and on cancel the check box should be deselected.but the code is exceuting before confiramtion from the user]
var Chksel= '<input type="checkbox" value="' + row[i].Id+ '" name="ChkValue" class="ChkValue" id="ChkValue" + i + '" checked/>'
alertify.confirm("Same value has been selected.Do you want to select again ?", function (e) {
if (e) {
Event.preventDefault();
saveflag =false;
return true;
}
else {
$('#Chksel' + ID).prop('checked', false);
saveflag = true;
return false;
}
})
if (saveflag != true) {
//save function
}