Alert Box
<img src="~/Themes/Images/AlertQues.png" class="DeleIcon" />
<p>Data already exist with Date: <b><span id="rid">@ViewBag.ID </span></b><br /> Do you want to assign the
data anyway ?</p>
<br />
<br />
<div class="floRight">
<input type="button" value="Yes" class="k-button" id="ConApptYes" style="width:100px;" onclick="ConflictYes();" />
<input type="button" value="No" class="k-button" id="ConApptNo" style="width:100px;" onclick="ConflictNo();"/>
</div>
<script>
function ConflictYes()
{
debugger;
var a = document.getElementById('CIdVal').value;
var b = document.getElementById('FResIdVal').value;
document.getElementById('alertFlag').value="false";
b = b + "," + a;
var window = $("#conflictAlert").data("kendoWindow");
window.close();
}
function ConflictNo()
{
var window = $("#conflictAlert").data("kendoWindow");
window.close();
}
</script>
Javascript in Another View
for (var i = 0; i < cResId.length;
i++) {
document.getElementById('CIdVal').value = cResId[i];
doneflag='false'
var window = $("#conflictAlert").data("kendoWindow");
window.open();
window.center();
}
Requirement
After the Conflict Alert Open if the “Yes” or “No” button is clicked then only the loop have to start to run again for its next iteration. Else the loop should not execute for the next I value. The Kendo Window must act like a “Confirmation Dialog Box”
Example
if (confirm(Are you sure . Do you want to continue?')) {
// Save it!
alert("Yes");
} else {
// Do nothing!
alert("No");
}
Thanks
Mayil
[On Behalf of Jeremy Thompson]
<img src="~/Themes/Images/AlertQues.png" class="DeleIcon" />
<p>Data already exist with Date: <b><span id="rid">@ViewBag.ID </span></b><br /> Do you want to assign the
data anyway ?</p>
<br />
<br />
<div class="floRight">
<input type="button" value="Yes" class="k-button" id="ConApptYes" style="width:100px;" onclick="ConflictYes();" />
<input type="button" value="No" class="k-button" id="ConApptNo" style="width:100px;" onclick="ConflictNo();"/>
</div>
<script>
function ConflictYes()
{
debugger;
var a = document.getElementById('CIdVal').value;
var b = document.getElementById('FResIdVal').value;
document.getElementById('alertFlag').value="false";
b = b + "," + a;
var window = $("#conflictAlert").data("kendoWindow");
window.close();
}
function ConflictNo()
{
var window = $("#conflictAlert").data("kendoWindow");
window.close();
}
</script>
Javascript in Another View
for (var i = 0; i < cResId.length;
i++) {
document.getElementById('CIdVal').value = cResId[i];
doneflag='false'
var window = $("#conflictAlert").data("kendoWindow");
window.open();
window.center();
}
Requirement
After the Conflict Alert Open if the “Yes” or “No” button is clicked then only the loop have to start to run again for its next iteration. Else the loop should not execute for the next I value. The Kendo Window must act like a “Confirmation Dialog Box”
Example
if (confirm(Are you sure . Do you want to continue?')) {
// Save it!
alert("Yes");
} else {
// Do nothing!
alert("No");
}
Thanks
Mayil
[On Behalf of Jeremy Thompson]