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

2 posts, 0 answers
  1. Jeremy
    Jeremy avatar
    4 posts
    Member since:
    May 2013

    Posted 26 Sep 2013 Link to this post

    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]
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 27 Sep 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
Back to Top