This is a migrated thread and some comments may be shown as answers.

How to execute the kendo window in a for loop to work like a Confirmation dialog box ?

1 Answer 172 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 26 Sep 2013, 01:37 PM
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]

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Sep 2013, 09:20 AM
Hi Mayil,

If I understand you correctly, you question is about algorithms and is not related to Kendo UI. Let us know if you need more information with regard to how the Kendo UI Window works, which is not included in the demos or documentation.

http://demos.kendoui.com/web/window/index.html

http://docs.kendoui.com/api/web/window

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Window
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or